Skip to content

the-wildwood-valley/nim-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nim-Game: Explore the self-improvement of prompts and strategies in the game of Nim.

Overview

  • The game begins with a certain number of pieces on the board. Two players take turns removing pieces, with a limit on how many pieces can be taken in a single turn. The player who removes the last piece from the board wins the game.

Participants

  • Referee
  • Player 1 (Left)
  • Player 2 (Right)

Game Rules

  1. The referee and both players enter the game area. The referee informs the players of their roles.
  2. The referee randomly determines the total number of pieces on the board, ensuring it is less than 30. The referee also randomly selects the maximum number of pieces that can be removed in one turn, within a range of 2 to 7. These numbers are not disclosed to the players.
  3. The referee initiates the process to determine who goes first. Players take turns guessing the maximum number of pieces that can be removed per turn. The first player to guess correctly wins the right to go first. If neither player guesses correctly, the referee declares the attempt unsuccessful, and the game is terminated.
  4. The referee then places the pieces on the board and announces the maximum number of pieces that can be removed in each turn, officially starting the game.
  5. Players take turns removing pieces, with each player required to take at least one piece and no more than the set limit per turn. Players must announce how many pieces they are taking, and the referee removes the corresponding number from the board. The game continues until no pieces remain. The player who removes the last piece wins. During the game, the referee does not interfere, but if a player violates the rules, the referee will declare them the loser.
  6. The referee announces the winner and the game ends.

nim game

Releases

No releases published

Packages

No packages published

Languages