Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kamranayub/blackjack
Sample Blackjack game written in .NET
https://github.com/kamranayub/blackjack
Last synced: 29 days ago
JSON representation
Sample Blackjack game written in .NET
- Host: GitHub
- URL: https://github.com/kamranayub/blackjack
- Owner: kamranayub
- Created: 2013-12-03T02:58:18.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-03T03:02:40.000Z (about 11 years ago)
- Last Synced: 2024-10-16T11:19:12.272Z (3 months ago)
- Language: Visual Basic
- Size: 28.6 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blackjack Sample Game
![Screenshot](Screenshot.png)
This is a sample game I created years ago when I began to learn WPF and OO design. I'm ashamed of some
of the code but it's actually pretty darn good for one of my pet project apps. It was written to be a sample
app but it was also a lot of fun. I think I gave up when I couldn't figure out how to implement the card
counting algorithms.Feel free to learn from and dissect the code. This was written when WPF was cool (hey, it still kinda is!).
Some of the code logic around decks and card counting was taken from other open source Blackjack games
back in the day (I'm sure they're still around) but I'm not sure if they all work like they're supposed to.Most of the code is well-commented but mainly it consists of a `BlackJack` game singleton and lots of events
that actors subscribe to (Players). The decks are dealt using a `Shoe` which contains a `Card` collection.
There are several deck strategies and card counting algorithms, though I don't think they're fully functional.
There's also a `Rules` object that contains the game rules that can be adjusted through the settings menu.## TODO
- It would be neat to turn this into a Windows 8 app + C#
- If someone can implement better AI and deck dealing, be my guest
- Implement the status bar area
- Implement betting, double-down, and other Blackjack things
- Implement MVVM## License
MIT License
Copyright (c) 2013 Kamran Ayub
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.