Skip to content

This is the game where there are 3 explorers and 3 cannibals on one side of the river. They want to cross to the other side but they only have a boat that fits 2 people. This program explores all possible moves and prints out the valid moves

Notifications You must be signed in to change notification settings

emmaWhoCodes/explorersVsCannibals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

explorersVsCannibals

This is the common problem where there are 3 explorers and 3 cannibals on one side of the river and they want to travel to the other side. The boat can only hold 2 people at a time, and if the cannibals ever outnumber the explorers on either side of the river, the cannibal will eat the explorer and the game is over.

This program explors all possible moves and prints out every sequence of moves that result in a successful game.

About

This is the game where there are 3 explorers and 3 cannibals on one side of the river. They want to cross to the other side but they only have a boat that fits 2 people. This program explores all possible moves and prints out the valid moves

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages