Beginning Microsoft Small Basic - A Computer Programming Tutorial by Philip Conrod & Lou Tylee
Author:Philip Conrod & Lou Tylee [Conrod, Philip]
Language: eng
Format: azw3
ISBN: 9781937161545
Publisher: Kidware Software LLC
Published: 2017-03-23T04:00:00+00:00
Other Things to Try
Possible changes to the Card Wars program are obvious, but not easy. One change would be to have more than two players. Set up three and four player versions. Perhaps add another loop to allow playing another game (without restarting the application).
In Card Wars, we stop the game after going through the deck one time. In the real card game of War, after the first round, the players pick up the cards they won, shuffle them, and play another round. Every time a player uses all the cards in their “hand,” they again pick up their winnings pile, reshuffle and continue playing. This continues until one player has lost all of their cards. Another change to Card Wars would be to write code that plays the game with these rules. As we said, it’s not easy. You would need to add code to keep track of which cards each player won, when they ran out of cards to play, how to reshuffle their remaining cards, and new logic to see when a game was over. Such code would use more arrays, more For loops, and more variables. If you want a programming challenge, go for it!
And, while you’re tackling challenges, here’s another. In the usual War game, when two cards have the same value - War is declared! This means each player takes three cards from their “hand” and lays them face down. Then another card is placed face up. The higher card at that time wins all 10 cards! If it’s still a tie, there’s another War. Try adding this logic to the game. You’ll need to check if a player has enough cards to wage War. Another difficult task, but give it a try if you feel adventurous.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
A Swirl of Ocean by Melissa Sarno(51196)
The Book of Dreams (Saxon Series) by Severin Tim(33506)
Cecilia; Or, Memoirs of an Heiress — Volume 1 by Fanny Burney(32707)
Cecilia; Or, Memoirs of an Heiress — Volume 2 by Fanny Burney(32070)
Cecilia; Or, Memoirs of an Heiress — Volume 3 by Fanny Burney(32051)
Call Me by Your Name by André Aciman(20689)
Eleanor and Park by Rainbow Rowell(15641)
Always and Forever, Lara Jean by Jenny Han(15053)
For the Love of Europe by Rick Steves(14809)
Norse Mythology by Gaiman Neil(13532)
Crooked Kingdom: Book 2 (Six of Crows) by Bardugo Leigh(12429)
Shadow Children #03 - Among the Betrayed by Margaret Peterson Haddix(12009)
Among the Betrayed by Margaret Peterson Haddix(11698)
Twisted Palace by Erin Watt(11252)
Six of Crows by Leigh Bardugo(10372)
They Both Die at the End by Adam Silvera(9923)
P.S. I Still Love You by Jenny Han(9690)
Fangirl by Rainbow Rowell(9433)
Thirteen Reasons Why by Jay Asher(9089)