Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions MathMind/MathMind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,28 @@ public override void Setup() {
// Load up the list of images.
mImageNames = LoadImageIndex();

// Loop through all the cubes and set them up.
// Load up the list of games.
ArrayList mGame1 = new ArrayList ("8", "plus", "7", "mult", "3", "res29");
ArrayList mGame2 = new ArrayList ("6", "mult", "7", "mult", "2", "res84");
ArrayList mGame3 = new ArrayList ("4", "mult", "5", "minus", "2", "res18");
ArrayList mGame4 = new ArrayList ("6", "plus", "4", "mult", "8", "res38");
ArrayList mGame5 = new ArrayList ("9", "mult", "7", "div", "3", "res21");
ArrayList mGame6 = new ArrayList ("5", "mult", "7", "plus", "8", "res43");
ArrayList mGame7 = new ArrayList ("6", "div", "2", "mult", "4", "res12");
ArrayList mGame8 = new ArrayList ("5", "div", "1", "plus", "9", "res14");
ArrayList mGame9 = new ArrayList ("3", "mult", "8", "mult", "4", "res96");

ArrayList mGamesArray = new ArrayList (mGame1, mGame2, mGame3, mGame4, mGame5, mGame6, mGame7, mGame8, mGame9);

int cnt = 0;
foreach (Cube cube in CubeSet) {

// Create a wrapper object for each cube. The wrapper object allows us
// to bundle a cube with extra information and behavior.
CubeWrapper wrapper = new CubeWrapper(this, cube, 'o');
mWrappers.Add(wrapper); // add wrapper including individual cube into wrapper-list
wrapper.DrawSlide();
wrapper.DrawSlide(mGame1[cnt][0]);
cnt++;
}


Expand Down Expand Up @@ -137,7 +151,7 @@ private void OnNeighborAdd(Cube cube1, Cube.Side side1, Cube cube2, Cube.Side si
}



//TODO: Siegüberprüfung:
Cube[] row = CubeHelper.FindRow(CubeSet);
if (row.Length == totalCubes) {
Log.Debug ("6 connected");
Expand Down Expand Up @@ -413,7 +427,7 @@ private void OnFlip(Cube cube, bool newOrientationIsUp) {
// This method draws the current image to the cube's display. The
// Cube.Image method has a lot of arguments, but many of them are optional
// and have reasonable default values.
public void DrawSlide() {
public void DrawSlide(String name=this.mApp.mImageNames[this.mIndex]) {

// Here we specify the name of the image to draw, in this case by pulling
// it from the array of names we read out of the image set (see
Expand All @@ -425,7 +439,7 @@ public void DrawSlide() {
//
// If you specify an image name that is not in the index, the Image call
// will be ignored.
String imageName = this.mApp.mImageNames[this.mIndex];
String imageName = name;

// You can specify the top/left point on the screen to start drawing at.
int screenX = mXOffset;
Expand Down
Binary file modified assets/images/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/div.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/images.sftbndl
Binary file not shown.
29 changes: 21 additions & 8 deletions assets/images/images_siftbndl_index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,25 @@
7
8
9
add
div
mul
res1
res2
res3
rev1
rev2
sub
minus
mult
plus
res12
res14
res18
res21
res29
res38
res43
res84
res96
rev12
rev21
rev34
rev41
rev48
rev69
rev81
rev83
rev92
Binary file renamed assets/images/add.png → assets/images/minus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file renamed assets/images/mul.png → assets/images/mult.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file renamed assets/images/sub.png → assets/images/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/res12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/res14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/res18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file renamed assets/images/res2.png → assets/images/res21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/res29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/res38.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/res43.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/res84.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file renamed assets/images/res1.png → assets/images/res96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/rev1.png
Binary file not shown.
Binary file added assets/images/rev12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/rev2.png
Diff not rendered.
Binary file added assets/images/rev21.png
Binary file added assets/images/rev34.png
Binary file renamed assets/images/res3.png → assets/images/rev41.png
Binary file added assets/images/rev48.png
Binary file added assets/images/rev69.png
Binary file added assets/images/rev81.png
Binary file added assets/images/rev83.png
Binary file added assets/images/rev92.png