Skip to content

this is a college project (team project ) its simple game of river crossing implementing some Encapsulations and design pattern

Notifications You must be signed in to change notification settings

shwehy/CrossRIverjava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CrossRiverjava

River Crossing IQ Logic Puzzles require you to get all of the characters(crossers) across a river in a small boat. The boat can cross the river many times to get anyone across. In our game each character(crosser) has some properties, the most important are: ● Weight: This property represents the weight of a crosser. ● Eating Rank: This property represents the eating rank of a crosser. Crossers with higher eating ranks can eat crossers with lower eating ranks. We have three major categories of crossers in our game(farmers, animals, plants). Farmers don’t eat any crosser, can’t be eaten by any crosser and can raft the boat. Animals and plants cannot raft the boat. There are two major types of animals (carnivorous and herbivorous). Carnivorous can only eat herbivorous but can’t eat plants. Herbivorous can only eat plants. This game has many challenging stories, for this assignment you have to implement at least 2 stories.

1 Story1: “A farmer wants to cross a river and take with him a carnivorous, a herbivorous and plant.” Rules:

  1. The farmer is the only one who can sail the boat. He can only take one passenger, in addition to himself.
  2. You can not leave any two crossers on the same bank if they can harm(eat) each other How can the farmer get across the river with all the 2 animals and the plant without any losses? Story2: “Four farmers and their animal need to cross a river in a small boat. The weights of the farmers are 90 kg, 80 kg,60 kg and 40 kg respectively, and the weight of the animal is 20 kg.”

Rules:

  1. The boat cannot bear a load heavier than 100 kg.
  2. All farmers can raft, while the animal cannot. How can they all get to the other side with their animal?

About

this is a college project (team project ) its simple game of river crossing implementing some Encapsulations and design pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages