Book Image

.NET Core 2.0 By Example

By : Neha Shrivastava, Rishabh Verma
Book Image

.NET Core 2.0 By Example

By: Neha Shrivastava, Rishabh Verma

Overview of this book

With the rise in the number of tools and technologies available today, developers and architects are always exploring ways to create better and smarter solutions. Before, the differences between target platforms was a major roadblock, but that's not the case now. .NET Core 2.0 By Example will take you on an exciting journey to building better software. This book provides fresh and relevant content to .NET Core 2.0 in a succinct format that’s enjoyable to read. It also delivers concepts, along with the implications, design decisions, and potential pitfalls you might face when targeting Linux and Windows systems, in a logical and simple way. With the .NET framework at its center, the book comprises of five varied projects: a multiplayer Tic-tac-toe game; a real-time chat application, Let'sChat; a chatbot; a microservice-based buying-selling application; and a movie booking application. You will start each chapter with a high-level overview of the content, followed by the above example applications described in detail. By the end of each chapter, you will not only be proficient with the concepts, but you’ll also have created a tangible component in the application. By the end of the book, you will have built five solid projects using all the tools and support provided by the .NET Core 2.0 framework.
Table of Contents (16 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

Designing the game


Looking at the preceding flow chart, which meets our requirements, we know we need to develop the following in the ASP.NET Core 2.0 application to constitute a basic two-player Tic-Tac-Toe game:

  1. A web page where players can go and register themselves with their name and display a picture
  2. A module to find an opponent to play against
  1. A module to simulate a coin toss to ensure fairness in giving players the option of making the first move
  2. The UI for the Tic-Tac-Toe game board in the web page, that is, a 3×3 grid where players can place their image
  3. Logic to indicate to the player whether it's their turn or the opponent's turn
  4. A module to show the opponent and player the move that was made
  5. A mechanism to ensure that the player and opponent's board are in sync with their moves
  6. Logic to check whether the game is over
  7. Logic to determine the winner

Sounds simple enough! Let's see how we can design and implement each of the preceding points by using ASP.NET Core 2.0 goodness:

  1. Web page for...