Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Dice poker and unit testing
Old
davidghemer
Member
 
Status: Offline
Posts: 38
Join Date: Nov 2011
Default Dice poker and unit testing - 11-24-2011, 01:27 AM

EDIT: Updated version now in the following work in progress thread
http://alice.org/community/report.php?p=44426
------------------------------------------
Hi all,

here's a simple dice poker game. At this stage the focus is the underlying logic, with a simple front end. The program stores 5 randomly generated dice rolls in an array. A number of functions have been implemented that check whether the 5 dice correspond to a certain combination, e.g. straight, full house etc.

I've also added a small number of unit tests. Just a proof of concept for now, but it shows how xUnit type tests can be done for functions in Alice. Lots more testing required.

A walkthrough of the code is given in the following video tutorial

http://www.youtube.com/watch?v=nMCIFmLMjP8

A brief description of the testing process is given in

http://www.youtube.com/watch?v=zYZjHd1mKMk

Hope this is useful.

David
Attached Files
File Type: a2w dicepoker.a2w (658.8 KB, 67 views)

Last edited by davidghemer; 12-11-2011 at 01:25 AM. Reason: added link to work in progress link
   
Reply With Quote
Old
hjussila
Junior Member
 
Status: Offline
Posts: 5
Join Date: Mar 2012
Default 04-03-2012, 10:33 PM

I think it is good. How long did you take to create a simple game like this? I have always wanted to create simple math games on Alice in my spare time, but blame it on my poor time management that I wasn't able to do so for a long time. I enjoyed your game!

Last edited by x2495iiii; 05-01-2012 at 06:38 PM.
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 05-01-2012, 09:23 AM

reminds me of mine game kinda

http://alice.org/community/showthrea...8469#post48469
   
Reply With Quote
Reply

Tags
dice poker, game, software testing

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.