Noughts & Crosses tutorial

2

Index

Attached Files

The following files have been attached to this tutorial:

.capx

nought-crosses.capx

Download now 277.81 KB

Stats

4,472 visits, 8,613 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 30 Oct, 2016. Last updated 19 Feb, 2019

Before we add more oxoSquare, first we need to create 3 INSTANCE VARIABLES therefore create 3 instance variables and name it:

1. xPostion = 0

2. yPostion = 0

3. playerNumber = 0

Now using CTRL drag and drop oxoSquare on Sprite_Squre nine times so it looks like below:

As we already have Array assign for this function we have to give each oxoSquare Instance Variable, which means CELL 1 will have xPostion = 0, yPostion = 0, PlayerNumer = 0 and next cell shown in picture is 1, 0, 0 and so on

xPostion = 0 xPostion = 1 xPostion = 2

yPostion = 0 yPostion = 0 yPostion = 0

PlayerNumer = 0 PlayerNumer = 0 PlayerNumer = 0

xPostion = 0 xPostion = 1 xPostion = 2

yPostion = 1 yPostion = 1 yPostion =1

PlayerNumer = 0 PlayerNumer = 0 PlayerNumer = 0

xPostion = 0 xPostion = 1 xPostion = 2

yPostion = 2 yPostion = 2 yPostion = 2

PlayerNumer = 0 PlayerNumer = 0 PlayerNumer = 0

Now lock this layer and unlock layer Square Grid, create sprite with 2 frames name it oxoScore

create sprite with 3 frames.

This is BLANK frame

  • 0 Comments

Want to leave a comment? Login or Register an account!