This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-03-10 13:04:04

benjamin2
Scratcher
Registered: 2008-10-18
Posts: 1000+

I need help for my new game.

I'm starting a new game called Knight Swap. The rules are to swap the positions of four chess knights, two white and two black. The knights move as in chess. But what I can't do is make sure you can only move knights as in chess. I can't get it to work. The knights can seemingly be moved anywhere by my programming.

How do I make it so the knights can only move as they would in Chess?


http://i.imgur.com/gp6tZ.gif

Offline

 

#2 2011-03-11 19:28:21

lemonpretzel
Scratcher
Registered: 2008-10-23
Posts: 100+

Re: I need help for my new game.

What's the link to the project?  I want to see the code.

Offline

 

#3 2011-03-11 19:31:53

puppetadventurer
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: I need help for my new game.

sounds hard


3

Offline

 

#4 2011-03-11 19:41:49

roger-
Scratcher
Registered: 2010-02-13
Posts: 100+

Re: I need help for my new game.

you can have it calculate the eight posible positions for the knight to move into using some algorithm BEFORE you move, then make it so that you can only move into those positions


Food is Fat. Fat is power.
        I am almighty.

Offline

 

#5 2011-03-17 20:19:01

zakattack7
Scratcher
Registered: 2011-02-15
Posts: 16

Re: I need help for my new game.

<change{block x}by(3
<change{block y}by(1

and have it moved the right way accordingly

Offline

 

#6 2011-03-18 07:18:33

krysgeke
New Scratcher
Registered: 2011-03-18
Posts: 1

Re: I need help for my new game.

I want to play the new game

Offline

 

Board footer