Giter Site home page Giter Site logo

csis-225-ticket-to-ride's Introduction

๐Ÿ‘‹ Hi, Iโ€™m @jlargs64

  • I'm a Technical Architect @ IBM Consulting
  • I like to learn about new things, right now I'm learning how to built data intenstive generative AI applications that augment digital workers.

csis-225-ticket-to-ride's People

Contributors

jenniferleclair avatar jlargs64 avatar lgriffiths97 avatar me19lamb avatar yousuf-abdullah-borna avatar

Watchers

 avatar  avatar  avatar

csis-225-ticket-to-ride's Issues

Game Set Up

This issue would include multiple components

Part 1: Deques and taxi cards (completed)

  • First: would be to read in all the taxi cards into an array deque called taxiCards.

Part 2: Deques and destination cards

  • Secondly: Read in the destination cards from the destination card file into an array deque called destCards.

Part 3: Shuffle and Deal Cards (partially completed)

  • Then use Collections.shuffle on taxiCards and destCards so that they are randomly shuffled.
  • After shuffling, deal 2 taxi cards to each player's taxiCard than deal 5 cards to the activeTaxiCards array deque.
    (For reference, they're the same ones that are drawn face up.)
  • Then deal 2 destination cards to each player. The player has the choice to keep one or both destination cards. If they choose to only take one destination card, add it to the back of the destCard deque.

Cards

Make a class for the card. The card has two child classes, destination, and taxi.

Taxi Card Class

  • There are 12 types of taxi's
    ** Pink, white, blue, yellow, orange, black, red, green, and locomotive (rainbow).

Destination Class

  • has an array of length 3.
  • Position 0: Worth - Points you get for completing it
  • Position 1: Start district
  • Position 2: End district

Develop the Scoring System

Part 1

In the scoring part of the switch case, tally up the scores of each players destination cards, the points for each claimed route(as shown on the board table).

  • 1 point for roads of length 1
  • 2 points for roads of length 2
  • 4 points for roads of length 3
  • 7 points for roads of length 4

Important: Make sure to decrease points if a destination card has not been met. Decrease the amount of cards worth.

Also, give a point for each tourist attraction connected to one or more route.

Dealing the destination cards

When a player starts the game, they have the option of getting 2 total destination cards. They can either keep one or both of them. It would be nice if the player had a nice GUI pop up that gave them the option and showed them the image of the destination card. I would put this right after where you read in each destination cards.

Player Object

The player should have a few fields.

  • Deck of cards they are holding.
  • Deck of destination cards
  • Number of trains
  • Points earned

Destination Card File to read in

Part 1: Creating the file

  • Create a file called destCards.txt
  • Inside that file manually read in the worth, starting city, ending city, and card number.
  • The format should look like this: 2 12 13 01

Graph Details

Each vertex in the graph can be represented as a number from 0 to 13

  • 0- Lincoln Center
  • 1- Central Park
  • 2- Midtown West
  • 3- Times Square
  • 4- United Nations
  • 5- Chelsea
  • 6- Empire State Building
  • 7- Gramercy Park
  • 8- Greenwich Village
  • 9- Soho
  • 10- East Village
  • 11- China Town
  • 12- Lower East Side
  • 13- Wall St.
  • 14- Brooklyn

Part 2: Reading in and Constructing the Destination Card Object

  • I recommend using scanners to read from the file.
  • The worth and starting and ending city will be read in as ints. The card number can be read in as a string.
  • For the last part, the card number, that corresponds to what image we are using as the destination card. we can use the card number to read in a new image as we did in the recent lab: toolkit.getImage("assets\dest-cards\dest-card"+cardNum+".jpg");
  • Every line or part of a line you read in should be added to a new destination card to construct.

Help Menu

Part 1: Saving our images as objects

  • Use both instruction files found in the assets folder named instructions-1.jpg
    and instructions-2.jpg
  • Put them both in an array as seen in the last lab we were.

Part 2: Displaying the image

  • In the help menu switch case in paint component draw the first image.
  • Have two buttons that one goes back to the main menu and the other one switches between the two images. Literally exactly like we did in the lab.

Music and Sounds

It would be nice if our game had some music! Maybe play some music for the main menu screen then another song on loop for gameplay. It would be also awesome to have some sounds for picking up a card, claiming a route, pressing a button, etc. It's up to whoever wants to add something! I recommend creating another file within assets called sounds that holds all of the music and sounds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.