Project - game of nim

Assignment Help Assembly Language
Reference no: EM131719887

Project - Game of Nim

Nim is a mathematical game of strategy in which two players take turns removing objects from distinct heaps. On each turn, a player must remove at least one object, and may remove any number of objects provided they all come from the same heap. The goal of the game is to avoid being the player who must remove the last object.

Nim is typically played as a misère game, in which the player who takes the last object loses. Nim can also be played as a normal play game, where the player taking the last object wins. This is called normal play because the last move is a winning move in most games; Nim is usually played so that the last move loses.

How to play the game

The game of Nim is two player game (you and computer)
Players take turns
On each turn, a player must choose one pile and remove at least one object from the chosen pile.
Two ways to play
Normal play, the player who removes the last object is the winner
Misère play, the player who picks the last object wins.

Normal Play

Convert the size of each pile into its binary notation
Add the columns up independently modulo 2.
The resulting value is called the Nim sum

Project Requirements

The game starts with 4 piles
Pile 1 contains 7 objects
Pile 2 contains 5 objects
Pile 3 contains 3 objects
Pile 4 contains 1 object

The user plays a misère game

The user should be given the option to choose who should make the first move (human player or the computer)

If the user is given the option to play either a misère game or a normal game

If the user is given the option to choose the number of piles and the number of objects in each pile.

Attachment:- Project.rar

Verified Expert

This task is basically for playing the Nim game which is mostly played by children it is very interesting game to play in which there is a pile of sticks, and two players take turns picking up 1, 2, or 3 sticks. The player who picks up the last stick wins.This task is basically completed in AsmIDE which is used for executing Assembly language code hence it is made particularly on AsmIDE.

Reference no: EM131719887

Questions Cloud

Discuss ideas of how the poem should flow : Arranging and rearranging your brainstormed items may give you ideas of how the poem should flow
Define ambiguity that the paragraph is well written : Every sentence in this paragraph is well written. Therefore, the paragraph is well written.
Ultra high-definition television : Use the Normal Approximation to the Binomial to calculate the probability that 4 or more households out of a sample of 16 will have at least one ultra high
Discuss bankruptcy subordinated debentures have claims : Debenture holders are general creditors' claims are protected by the property. At the time of bankruptcy Subordinated debentures have claims
Project - game of nim : Nim is a mathematical game of strategy in which two players take turns removing objects from distinct heaps - a player must choose one pile and remove
Briefly explain-a good athlete is a good human being : Identify the fallacies of presumption, ambiguity, and illicit transference committed by the following arguments, giving a brief explanation for your answer.
What is the minimum sample size : What is the minimum sample size needed to estimate the population mean salary of a company at 95% confidence with a margin of error of $1,500?
Describe the evolution of policing in american society : Describe the evolution of policing in American society. Describe the difference between reactive and proactive policing.
Standard deviation of the sampling distribution : What is the Shape, Mean (expected value) and standard deviation of the sampling distribution of the sample proportion for samples of size 250?

Reviews

inf1719887

4/2/2018 6:22:48 AM

okay. but please review those class's notes to have an idea about the course that i have 26107225_1Lect 1.pptx 26107225_2Lect 2.pptx 26107225_3Lect 3.pptx Those are also notes from our class ( please try to follow similar way to write the code ) 26107254_1Lect 4.pptx 26107237_2Lect 5.pptx I paid it. please do it as soon as possible and check the PP slides to follow same way to approach the successful coding. we use AsmIDE.exe software and ( HCS-12). MAKE SURE to follow same way that in the PP slides I sent you. also, We use AsmIDE.exe software so the code must be do by using this software and run successfully

len1719887

11/13/2017 4:10:37 AM

Hi, I have microprocessor (HCS-12) assignment and we use Asm.IDE software to write the code. I attached you the project instructions An additional 5 points extra credit if the user is given the option to choose the number of piles and the number of objects in each pile. Due date Tuesday

Write a Review

Assembly Language Questions & Answers

  Demonstrate a clear understanding of online tools

Demonstrate a clear understanding of, and ability to use, the specific features of different online tools Convey a coherent and consistent identity and related theme across all elements of your web presence

  Cache statistics for two versions of matrix multiplication

Explore the cache statistics for two versions of matrix multiplication - Cache can be configured using the preference in ARMSim. For getting cache statistics, first put a breakpoint on SWI 0x11 instruction, and then note the statistics from cache

  Write an assembly program in mips that get the array size

Write an assembly program in mips that get the array size from the keyboard, then reads a list of integers from the keyboard and writes the sorted list in ascending order to the console screen.

  Write a sequence of two instructions

Write a sequence of two instructions that copies the inter in 4-7 from the AL registers into bits 0-3 of the Bl register. The upper 4 bits of AL will be cleared as will the upper 4 bits of BL. (Microsoft Assembly Language)

  Convert file of strings to a base64 encoding

Take a file of strings (Which may be binary data) and convert those string to a Base64 encoding.

  Find out the largest number from unordered array

Write assembely language program to find out the largest number from unordered array of 8bit starting at the location 0500h (offset)

  Create a simulated ant colony

You are going to create a simulated ant colony, in which the user will take the role of the queen who's duty it will be to manage the health of the colony. The simulation will proceed in a turn-based fashion, where each turn the user can choose to..

  Write a program which will give the calendar for 3 mnth

Need the following assignment assembled Using MASM and notepad ++ for windows 8086 processor write a program which will give the calendar for atleast 3 months starting from November 2011 to January 2012 including the days/dates

  Develop assembly program to implement a finite state machine

In this lab we will write an assembly program to implement a Finite State Machine (FSM) that recognizes hexadecimal integer constant that conforms to MASM syntax.

  What would be the ieee 754 double precision binary

What would be the IEEE 754 double precision binary representation of the floating point value 2.71828×10-13? Express your final answer as a 16-hexdigit number and explain how your answer was obtained for full credit.

  Write an arm assembly function that takes an array

Write an ARM assembly function that takes an array of integers and insures that all entries are positive. Remember the initial integer in the array is at index zero.

  Marie program that will input a variable number

Develop a MARIE program that will input a variable number of user entered DECimal whole number grades, validating each one (0-100) in a subroutine

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd