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

Tic-Tac-Toe 


Tic-Tac-Toe is a simple two-player game, traditionally with its marks as X and O. Each player places his/her mark in a space and alternate turns in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.

This is what the pen and pencil game board looks like. In the following illustration, the player with the X marker is the winner:

Requirement specifications

In this chapter, we will create a two-player Tic-Tac-Toe game with the following basic requirements:

  1. As a player, I should be able to register with my name and display a picture
  2. As a player, I should be able to find an opponent, that is, the second player to play against
  3. The first two players to find opponents should be paired as opponents in the game
  4. The decision as to which player gets the chance to make the first move should be fair
  5. As a player, I should be able to use my display picture as my mark, rather than the conventional X and O
  6. The decision as to who...