Skip to content

triton11/CropsAndRobbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Crops and Robbers

Crops and Robbers is a game I created to experiment with Social Deduction game design and to have fun with friends. It plays like a fast, chaotic version of Town of Salem or Warewolf/Mafia. Farmers try to farm, but watch out for the robbers that can steal your crops! It is customary to start each round by exclaiming “I am a farmer!” regardless of your role.

This code is not my best work - I wrote it generally late at night, pivoted several times, and tried to get things working as quickly as possbile without taking time to optimize or structure the code. Refactoring this code is not a super high priority since this is a personal project, but I hope to get around to it someday.

Setup:

  • intall Ruby 2.3.0

  • install Rails 4.2.6

  • git clone the repo

  • run rake db:migrate

  • start the server with rails -s

Roles:

  • Farmer: Each round the farmer can either farm and get 1 crop, or guard another player. If a robber visits the player that is being guarded, they will not get any crops and they will be shot.

  • Robber: Robbers know who the other robbers are and can choose a player to rob each round. Robbers can steal as many crops as there are non-robbers in the game (i.e. if there are 5 players and 2 robbers, each robber can take at most 3 crops.) If they rob a player that is being guarded, they will be shot and not get any crops. If they are shot twice, they will no longer be able to rob for the rest of the game.

  • Investigator: The investigator is on the team of the farmers. Each round they can visit a players house and see who else visits that player that round. They will not see what role any visitors have.

  • Donator: Each round, the donator can give 1 crop to another player.