1.1-Introductie-Programmeren

Card game

Difficulty: Filled Outlined Outlined

As you already know the SaxionApp can be used to create all sort of games. In this (big) assignment it’s up to you to create some cardgames using the SaxionApp. We’ve provided card images, it’s up to you to create the logic

Exercise 3.1: Create a card deck and pick cards

The most basic usage of the cards is to pick a random card each time the player press enter. It might be helpful to create a Card class where you store the information of the card:

Please note:

Now you know this, you can create a program that picks a card from the deck each time the player presses a key. (The remove(int index) function of the ArrayList is helpfull, because that returns a Card and removes it from the list)

Exercise 3.2 Create a basic highest card game

The rules are quite easy: Their are two players. They pick a card turn by turn. The player with the highest card receives 10 euro. The player with the lowest card loses 11 euro.

Example output

Example

Exercise 3.3 Blackjack

Read the rules of Blackjack (There are a lot of variants) and implement your own Blackjack game! (Remember the problem solving steps to split up this big problem into smaller parts)

Exercise 3.4 Implement your own card game

Find another card game and try to implement it. There are a lot of websites with examples and rule descriptions. Good luck!