problems in mathematique game creation

Get help using Construct 2

Post » Mon Jul 28, 2014 7:18 pm

hi everyone
im triying to build a mathématique game for my school project work
i have the idea and the desgin but i face a lot of problms in construct
my game exemple
player 1:1286(choose a numbe r with 4 caracter)
player 2: 2359(choose a numbe r with 4 caracter)
every player sould now the number of the other player
if a caracter is equal to the carcter of player 2 it give T if it ecxst but not in his place it give V until one of the player now the number of the other player
)i programe it with pascal and c )
so sorrryyyyy for my bad english
please help me
B
3
Posts: 9
Reputation: 193

Post » Tue Jul 29, 2014 5:41 pm

Hey @gerrard1995,

let me quickly recap it, just to be sure:

1.) player one picks a 4 digit number
2.) player two picks a 4 digit number
3.) when any number matches it says "T" (=true?) if not "V" (=false?)

You could achieve that by putting the digits into two arrays, e.g. 1# (1|2|8|6), 2# (2|3|5|9).
Afterwards you check the single places of the array one by one.
I don't understand the rest of the game concept tho. :(
B
14
S
2
G
1
Posts: 53
Reputation: 850

Post » Sun Sep 14, 2014 9:36 am

this is the rules
Each player writes a four-digit number on a piece of paper, taking care to ensure that the other player does not see the number. The digits must all be different. (For example, 4729 would be legal, but 4724 would not be legal.)Determine which player will guess first.

Gameplay

In turn, players try to guess their opponent's number. The opponent responds by announcing the number of matches.

A digit which is in the number but not announced in the correct position is a V." A digit which is in the number and is announced in the correct position is a "T."(or T.V can be sprites or somthing)

EXAMPLE: Andre's secret number is 8045. Beth guesses 0865. There are two V (0 and 8) and one T(5). Andre says, "There are two V and one T Andre does not reveal which digits are the cows and which one is the bull.
B
3
Posts: 9
Reputation: 193

Post » Sun Sep 14, 2014 9:47 am

Ah, so you are trying to recreate mastermind, but with numbers instead of coloured pins..

I guess using a string for this would do and using tokenAt to see if the number exists in the right place..
Using an array would also be an option..

After the player has guessed you could loop through it to see if the number exists and if so if it´s in the right place..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: Studio Mercato and 7 guests