Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

TuxMan20

Members
  • Content Count

    4
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by TuxMan20

  1. Just an update to specify that a couple weeks ago I completed the main gameplay mechanics. You can now play a complete game of blackjack inside OpenOS (Including splitting hands) :P 

    I fixed the type checking, so now uncooperative users will not make the game crash. 

    On the plate now, I'd like to implement some sort of end-game (like 1 million$ or something...) and take into account debt when getting to 0$. At the moment, the game exits when you run out of money.

    I still have plans to use one of the GUI to make it more interesting... someday... :D 

     

  2. Hey there,

    I figured I'd share how my project is advancing.

    I realized that for a computer within a game... there really was a lack of games :P If you ever wanted a way to chill while you wait for your 8 High Powered Solar Arrays to craft... here's  a solution!

    The game works and plays but it's still a work in progress as there is still no type checking when users enter a choice (entering a letter when the program wants a number makes it crash, for exemple). The credits are not saved in a file for persistence yet. Finally, I stil haven't completed the split mechanics (When you receive two equal cards as your first cards, you can split them to play two hands). Implementing it will require 4 tables within a table within a meta-table, and I'll have to rework A LOT of functions to take into account the number of hands a player can have (dealing cards, placing bets, ending the turn, comparing against the dealer, etc.... ). 

    One aspect that I liked is the shuffling. You will see inside the code, the deck never gets shuffled. I struggled to find a good shuffling algorithm when I came to the conclusion I didn't need one. The reason is simple: it's not a real deck of cards. Instead of finding a way to shuffle data inside a table, and picking the first one out, I figured it made WAY more sense to simply pick a card inside the table at random. Saved me an evening of work ;)

    So, I hope you enjoy it! :D 

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.