Skip to content

"Ascii-ravan" A text-based take on the card game Caravan. Final Project for CS121, Java and OOP Principles

License

Notifications You must be signed in to change notification settings

alecthedev/project4-caravan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

project4-caravan: "ASCII-RAVAN"

Final Project for CS121, Java and OOP Principles.

image

This is one of the most ambitious projects I have ever done so far, and spent just over a week on it. Overall, I am pleased with it. I believe the I underestimated the scope of recreating Caravan, but I regret nothing and had a blast solving all the challenges.

I was able to replicate most of the rules and squash as many bugs as possible in the time I had. I learned a lot and would approach this project differently if I were to do it again.

Note: A few rules differ from the official Caravan rules. See "Note on rules/Known bugs" section below.

How to run

  1. Open project with your IDE, run main method in Main class
  2. Run in the console. If you don't know how, check out this freecodecamp.org article.

Note: You need to have the JRE installed for these methods.

Gameplay

This game was designed with two players in mind.

Once the game has begun, players will find themselves looking at this table:

image

Each player is competing to win at least 2 of the 3 caravan "routes" (A, B, or C).

Entering "O" on this screen shows us these options:

image

To begin, Player 1 must type "V" then choose a caravan route. This will bring up Player 1's "caravan" for that route.

image

All six caravans (two per route, i.e. one for each player) must be initialized with a number card in the first round.

image

Upon playing our first card, as Player 1, we can see that the card's value has been added to the table view. It is now Player 2's turn.

image

Entering "O" while viewing a caravan shows the above available options. "S" allows the player to play a card on their opponents caravan. This can only be done with face cards, and only after the first round is complete (all caravans have had a number card played).

image

Not so fast Player 1...

image

Those are the basics of command entering and general gameplay.

Rules

The rules can be pulled up in-game by typing "R" whenever the screen displays "ENTER 'O' FOR OPTIONS OR TYPE COMMAND".

image

Note on rules/Known bugs

As mentioned at the start of the README, there are a few things that differ from the official rules.

  • Players start with a 52 card deck, therefore there are no jokers. There is no deck customization.
  • There is no gambling. It isn't really necessary to play the game and would only add complexity.
  • While multiple kings can be stacked, currently they do not continue to double the card they are attached to.

About

"Ascii-ravan" A text-based take on the card game Caravan. Final Project for CS121, Java and OOP Principles

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages