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

  Prompts for an int8 value to inspect and then prints

Write an HLA Assembly program that prompts for an int8 value to inspect and then prints it in binary format.

  Write two-pass assembler for subset of mips instruction set

Write a two-pass assembler for a subset of the MIPS instruction set. It should be able to read an assembly file from the command line and write the object code to standard output.

  Bresenham''s algorithm for drawing a line

This assignment is about writing a line drawing subroutine in ARM assembly language. The following is a C implementation of Bresenham's algorithm for drawing a line between two points.

  Relative addressing mode is a special way

Relative addressing mode is a special way to specify operands. Which instructions are associated with the relative addressing mode? Why do you think it was called "relative" addressing mode? Hint: Use a search engine to find out about "portable code"

  Write a mips assembly language program to count

Write a MIPS assembly language program to count the number of 1s in a 32-bit word. Use assembly directives to initialize meaningful test data, make room for the result and use variable names within the code.

  Assembly language point-of-view

From an Assembly Language point-of-view, any registers that are touched by a function need to first be preserved and then later restored to their original value when that function ends, if that functions wishes to leave no side-effects after its exec..

  Function which correctly sorts three

Write an x8086 HLA Assembly language program that implements a function which correctly sorts three parameters and returns a boolean value in AL which should be set to true if any swaps were performed to sort the sequence in increasing order.

  Analog measurements prepare an assembly program for the

analog measurements prepare an assembly program for the correctly measures the wind direction to a precision of 45deg n

  Write the required embedded assembler code

Write the required embedded (_asm) assembler code for each section in the corresponding inline assembler blocks denoted by the _asm keyword.

  Write a mips assembly language program

Write a MIPS assembly language program that prompts for a user to enter a series of floating point numbers and calls read_float to read in numbers and store them in an array. Then the program should display the array content on the console window. Th..

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Program (starting at address $4000) to find the average

Write a program (starting at address $4000) to find the average of four 16-bit

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