Assignment 1: Miner49er

Miner49er.PNG

Information:


The Miner49er assignment is to write your own FSA that improves upon the strategy in the provided example.
The rules of Miner49er are as follows:
  • Score is number of pieces of gold in the bank at the end of the game
  • Travel:
    • Travel between either the bank or the bar and the mine costs 1 thirst
    • Travel between bank and bar costs 0 thirst
  • Mining:
    • Can only be done at the mine
    • Adds one gold to miner's pocket
    • Increases thirst by 1
    • Can only be done if thirst < 15
    • Can only be done if pocket contains <10 gold
  • Banking
    • Moves one gold from pocket to bank
    • Can only be done at bank
  • Drinking
    • Reduces thirst by 1
    • Can only be done at the bar

To run Miner49er:



Download the MIner49er game:



You will also need to download and install OpenAL:


Important: Windows 8 or later marks downloaded dlls as "blocked". You cannot load a blocked DLL at run time. This will cause Miner49er to exception when it tries to load the play strategy. To fix this, unzip Miner49erPc.zip and cd to the Debug/Competitor directory. Then right click on the
MIner49erSampleCompetitor.dll file and select Properties. In the properties dialog, find the "Unblock" button and click it.

UnblockStrategy.PNGhand-point-left-2.jpg

Now you can run Miner49er by double clicking Miner49erPC.exe

Implementing your FSA on a PC


Once you have Miner49er running, you will need to make your own FSA competitor.

Download the sample miner FSA project



Unzip and open the solution in Xamarin Studio (available at
http://monodevelop.com/Download)

Edit the file "SimplePlayStrategy.cs". Change its name to something more appropriate. Change the code to return your name and implement your FSA. Build the new DLL.

Test your strategy by replacing the DLL in the Competitors folder in Miner49erPC with your own DLL and running Miner49er.

Turn in instructions

To be added.

For explanation of the FSA library calls and the MinerControls interface, see the week 1 class slides.