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

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

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