Fox and Rabbit Game

Advanced Programming, Siena University, Spring 2024

Project Description

This is a chase game with two players: the fox and the rabbit. The rabbit tries to pick up carrots while the fox tries to chase the rabbit.

Game Rules

Each player has an identical board, but cannot see the other's board. The rabbit moves in secret and announces only when picking up a carrot. The fox announces each move, keeping the rabbit aware of its location. The fox starts on the outer edge, and the rabbit begins in the center. Players alternate turns, starting with the rabbit. A fox-rabbit encounter results in a point for the fox, resetting the carrots. The rabbit scores by successfully picking up a carrot.

Moving

Rabbit: Can move to any space and pick up a carrot in the same turn.
Fox: Can only move between spaces.

Scoring

Rabbit: Scores 1 point by picking up a carrot.
Fox: Scores 1 point by catching the rabbit.
Victory: The first player to score three points wins.