Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Project Showcase: Mahjong calculator

 
Post new topic   Reply to topic    Forum Index -> Files
Author Message
kranenborg



Joined: 27 Jul 2009
Posts: 51
Location: Groningen, The Netherlands

Posted: 14 October 2016, 20:04 PM    Post subject: Project Showcase: Mahjong calculator Reply with quote

The popular Mahjong game (4 players using ivory bricks) uses a points reckoning system that balances the individuals' scores in a certain way so that the net result always equals zero. This process is rather tedious and therefore a good candidate for automation. My oldest son and I undertook the project of implementing such a calculator in ZBasic hardware using a ZX328L and a simple matrix keyboard and an LCD display. Attached below are:
1. A picture of the calculator in the game setting
2. The circuit diagram
3. The ZBasic project file

The project is a nice example of the flexibility and power of the ZBasic platform, as shown for example by:
- The use of the FirstTime command to show a welcome text only a few times (a concise and cleaned-up version is shown in http://www.zbasic.net/forum/about1864.html.
- The use of the AN105 code for interfacing the matrix keyboard, providing for a very fluid behavior of the keyboard in practice.
- Object-oriented programming as a useful way to easily include functionality (for example: LCD display routines are used through the mix-in concept).

Posted in support of the continued liveliness of the ZBasic platform & forum ...

Best regards,
Jurjen



MahyongCalculator.zip
 Description:
The project code

Download
 Filename:  MahyongCalculator.zip
 Filesize:  7.96 KB
 Downloaded:  60 Time(s)


MahYongCircuit.JPG
 Description:
The electronic circuit diagram

Download
 Filename:  MahYongCircuit.JPG
 Filesize:  104.09 KB
 Downloaded:  55 Time(s)


Mahyong points calculator 2.jpg
 Description:
The calculator in physical form

Download
 Filename:  Mahyong points calculator 2.jpg
 Filesize:  211.36 KB
 Downloaded:  61 Time(s)

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> Files Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2017 Elba Corp. All rights reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group