- What is git?
- Why do we use git?
- Register on github
- Create repostiory on git hub
- Download VSCode
- Clone your repository to local
- Install git client through vscode
- Install dotnet SDK
- Install necesasry extensions: C# Dev Kit
- Install debuging tool:
dotnet workload install wasm-tools
- Run command
dotnet new blazor -int Auto -n GameCourse -o .\
- Try run the project
dotnet run
- Create launch settings
-
List the least acceptable rules
- A playground with boundaries.
- Is a square with a hight and width.
- It is composed of hight * width cells.
- A snake
- Can move to a direction of Up, Left, Down and Right.
- Moves 1 step a time.
- It cannot turn back.
- Grow one node when eats one food.
- Dead when hit boundary/itself.
- Food
- Disappeared when eaten by snake.
- Appears at a random cell in the ground.
- Cannot apppear on a cell that already has food or snake body.
- Add one food to the playground every 10s.
- A playground with boundaries.
-
Turn the real world requirements into programming concepts
- Playground
- Width
- Hight
- Snake
- Snake has a size n.
- An array of n cells
- first node in the array is the snake head. nodes[0] is head.
- last node in the array is the snake tail. nodes[n] is tail.
- When the snake moves one step
- a new node added to the array at the first position. insert node to nodes at 0.
- the new node cannot be it's body
- the last node of the array is removed. remove nodes[n]
- When a food is eaten, do not remove the last node.
- Whne the new node is at boundry or itself, DEAD.
- Food
- An array of cells
- A food has the location of the cell in playground.
- When a new food is showing up, the new food is added to the array.
- When a food is eaten, the food is removed from the array.
- Playground