|
From: <kro...@us...> - 2007-05-24 20:05:21
|
Revision: 429
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=429&view=rev
Author: kroko_koenig
Date: 2007-05-24 13:05:15 -0700 (Thu, 24 May 2007)
Log Message:
-----------
Update to version 0.3
Modified Paths:
--------------
trunk/plugins/My Hexxagon/Skin/SimpleMP/MyHexxagon.xml
trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.cs
trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.csproj
trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/Properties/AssemblyInfo.cs
trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon.suo
trunk/plugins/My Hexxagon/hexxagon.jpg
trunk/plugins/My Hexxagon/readme.txt
Added Paths:
-----------
trunk/plugins/My Hexxagon/HexLayout.txt
trunk/plugins/My Hexxagon/Skin/SimpleMP/Media/Hexxagon/MyHexx0X.png
trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.csproj.user
trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/hexxagon.png
trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/hexxagonDisabled.png
Removed Paths:
-------------
trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.xml
Added: trunk/plugins/My Hexxagon/HexLayout.txt
===================================================================
--- trunk/plugins/My Hexxagon/HexLayout.txt (rev 0)
+++ trunk/plugins/My Hexxagon/HexLayout.txt 2007-05-24 20:05:15 UTC (rev 429)
@@ -0,0 +1,15 @@
+ 62
+ 52 73
+ 42 84
+ 32 95
+22 106
+
+ 65
+ 56 77
+
+
+26 110
+ 37 100
+ 48 90
+ 59 80
+ 70
\ No newline at end of file
Added: trunk/plugins/My Hexxagon/Skin/SimpleMP/Media/Hexxagon/MyHexx0X.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/My Hexxagon/Skin/SimpleMP/Media/Hexxagon/MyHexx0X.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/plugins/My Hexxagon/Skin/SimpleMP/MyHexxagon.xml
===================================================================
--- trunk/plugins/My Hexxagon/Skin/SimpleMP/MyHexxagon.xml 2007-05-24 19:27:07 UTC (rev 428)
+++ trunk/plugins/My Hexxagon/Skin/SimpleMP/MyHexxagon.xml 2007-05-24 20:05:15 UTC (rev 429)
@@ -51,7 +51,35 @@
<label>Start</label>
<onleft>2</onleft>
<onright>22</onright>
- <onup>4</onup>
+ <onup>6</onup>
+ <ondown>15</ondown>
+ <animation effect="fade" time="150">WindowOpen</animation>
+ <animation effect="fade" time="150">WindowClose</animation>
+ </control>
+ <control>
+ <description>Board</description>
+ <type>button</type>
+ <id>15</id>
+ <posX>60</posX>
+ <posY>131</posY>
+ <label>Board: 1</label>
+ <onleft>15</onleft>
+ <onright>22</onright>
+ <onup>2</onup>
+ <ondown>10</ondown>
+ <animation effect="fade" time="150">WindowOpen</animation>
+ <animation effect="fade" time="150">WindowClose</animation>
+ </control>
+ <control>
+ <description>Undo</description>
+ <type>button</type>
+ <id>10</id>
+ <posX>60</posX>
+ <posY>165</posY>
+ <label>Undo</label>
+ <onleft>2</onleft>
+ <onright>22</onright>
+ <onup>15</onup>
<ondown>3</ondown>
<animation effect="fade" time="150">WindowOpen</animation>
<animation effect="fade" time="150">WindowClose</animation>
@@ -61,11 +89,11 @@
<type>button</type>
<id>3</id>
<posX>60</posX>
- <posY>131</posY>
+ <posY>199</posY>
<label>Mode: Play vs Computer</label>
<onleft>3</onleft>
<onright>3</onright>
- <onup>2</onup>
+ <onup>10</onup>
<ondown>4</ondown>
<animation effect="fade" time="150">WindowOpen</animation>
<animation effect="fade" time="150">WindowClose</animation>
@@ -75,7 +103,7 @@
<type>button</type>
<id>4</id>
<posX>60</posX>
- <posY>165</posY>
+ <posY>233</posY>
<label>Level: Amateur</label>
<onleft>4</onleft>
<onright>4</onright>
@@ -89,7 +117,7 @@
<type>label</type>
<id>5</id>
<posX>70</posX>
- <posY>204</posY>
+ <posY>272</posY>
<label>#Round</label>
<font>font12</font>
<align>Left</align>
@@ -102,7 +130,7 @@
<type>label</type>
<id>7</id>
<posX>70</posX>
- <posY>238</posY>
+ <posY>306</posY>
<label>#Player</label>
<font>font12</font>
<align>Left</align>
@@ -115,7 +143,7 @@
<type>button</type>
<id>6</id>
<posX>60</posX>
- <posY>267</posY>
+ <posY>335</posY>
<label>What's this?</label>
<onleft>6</onleft>
<onright>6</onright>
@@ -124,13 +152,13 @@
<animation effect="fade" time="150">WindowOpen</animation>
<animation effect="fade" time="150">WindowClose</animation>
</control>
-
+
<control>
<description>text label</description>
<type>label</type>
<id>12</id>
<posX>70</posX>
- <posY>310</posY>
+ <posY>394</posY>
<label>#Ply1.Count</label>
<font>font12</font>
<align>Left</align>
@@ -143,7 +171,7 @@
<type>label</type>
<id>13</id>
<posX>70</posX>
- <posY>340</posY>
+ <posY>424</posY>
<label>#Ply2.Count</label>
<font>font12</font>
<align>Left</align>
@@ -156,7 +184,7 @@
<type>progress</type>
<id>8</id>
<posX>100</posX>
- <posY>310</posY>
+ <posY>394</posY>
<width>180</width>
<label>#Ply1.Percentage</label>
<visible>yes</visible>
@@ -168,12 +196,35 @@
<type>progress</type>
<id>9</id>
<posX>100</posX>
- <posY>340</posY>
+ <posY>424</posY>
<width>180</width>
<label>#Ply2.Percentage</label>
<visible>yes</visible>
<animation effect="fade" time="150">WindowOpen</animation>
<animation effect="fade" time="150">WindowClose</animation>
</control>
+ <control>
+ <description>hidden hex</description>
+ <type>image</type>
+ <id>198</id>
+ <posX>270</posX>
+ <posY>220</posY>
+ <width>40</width>
+ <height>60</height>
+ <texture>\Hexxagon\MyHexx01.png</texture>
+ </control>
+ <control>
+ <description>text label</description>
+ <type>label</type>
+ <id>14</id>
+ <posX>70</posX>
+ <posY>458</posY>
+ <label>#Time</label>
+ <font>font12</font>
+ <align>Left</align>
+ <textcolor>ffffffff</textcolor>
+ <animation effect="fade" time="150">WindowOpen</animation>
+ <animation effect="fade" time="150">WindowClose</animation>
+ </control>
</controls>
</window>
Modified: trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.cs
===================================================================
--- trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.cs 2007-05-24 19:27:07 UTC (rev 428)
+++ trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.cs 2007-05-24 20:05:15 UTC (rev 429)
@@ -30,9 +30,11 @@
using MediaPortal.GUI.Library;
using MediaPortal.Dialogs;
using MediaPortal.Util;
+using MediaPortal.Configuration;
namespace MediaPortal.GUI.MyHexxagon
{
+ [PluginIcons("MyHexxagon.hexxagon.png", "MyHexxagon.hexxagonDisabled.png")]
public class MyHexxagonGUI : GUIWindow, ISetupForm
{
#region SkinControl
@@ -44,6 +46,10 @@
protected GUIButtonControl BtnLevel = null;
[SkinControlAttribute(6)]
protected GUIButtonControl BtnWhatsThis = null;
+ [SkinControlAttribute(10)]
+ protected GUIButtonControl BtnUndo = null;
+ [SkinControlAttribute(15)]
+ protected GUIButtonControl BtnBoard = null;
#endregion
@@ -58,15 +64,20 @@
int wait = 0; // init wait timer for computer
+ int time = 0; // timer for game
+ int boardNo = 1; // default board
+
+ int[] time_rec = { 999, 999, 999, 999, 999 };
+
// init board
int[] board = {0,0,0,0,0,0,0,0,0,0, // 0-9
0,0,0,0,0,0,0,0,0,0, //10-19
0,0,1,1,1,1,1,0,0,0, //20-29
0,0,1,1,1,1,1,1,0,0, //30-39
0,0,1,1,1,1,1,1,1,0, //40-49
- 0,0,1,1,1,1,0,1,1,1, //50-59
- 0,0,1,1,1,0,1,1,1,1, //60-69
- 1,0,0,1,1,1,1,0,1,1, //70-79
+ 0,0,1,1,1,1,1,1,1,1, //50-59
+ 0,0,1,1,1,1,1,1,1,1, //60-69
+ 1,0,0,1,1,1,1,1,1,1, //70-79
1,0,0,0,1,1,1,1,1,1, //80-89
1,0,0,0,0,1,1,1,1,1, //90-99
1,0,0,0,0,0,1,1,1,1, //100-109
@@ -74,6 +85,9 @@
0,0,0,0,0,0,0,0,0,0, //120-129
0,0,0}; //130-132
+ int[,] rem_board = new int [80,140];
+ bool initBoard = false;
+
// distances for moves
int[] MoveDouble = { 10, 11, 1, -10, -11, -1 };
int[] MoveJump = { 9, 20, 21, 22, 12, 2, -9, -20, -21, -22, -12, -2 };
@@ -94,6 +108,11 @@
// Off Double Jump On1 On1Select On2 On2Select
// 1 2 3 4 5 6 7
+ private int[] ani01 = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ // possible moves 0-5, player 6 , cnt 7
+ private int[] ani02 = { 0, 0 , 0};
+ // last move, player, counter
+
// game ticker for the computer
private System.Windows.Forms.Timer _Game = new System.Windows.Forms.Timer();
@@ -203,94 +222,107 @@
protected override void OnPageLoad()
{
+
// start game ticker
_Game.Interval = 100;
_Game.Tick += new EventHandler(_Game_Tick);
- _Game.Start();
+ _Game.Start();
base.OnPageLoad();
// get position from the start button
- int StartX = GetControl(BtnStart.GetID).XPosition;
- int StartY = GetControl(BtnStart.GetID).YPosition;
- int Width = GetControl(BtnStart.GetID).Width;
+ int StartX = GetControl(198).XPosition;
+ int StartY = GetControl(198).YPosition;
+ // Disable level control
+ GUIControl.HideControl(GetID, 198);
- // calc the position of the hexxagon
- StartX = StartX + Width + 10;
- StartY = StartY + 100;
+ try
+ {
+ int StartT = GetControl(22).XPosition;
+ }
+ catch
+ {
+ initBoard = false;
+ }
- // draw buttons
- for (int j = 0; j < 9; j++)
+ if (initBoard == false)
{
- for (int i = 0; i < DrawCnt[j]; i++)
+ initBoard = true;
+ // draw buttons
+ for (int j = 0; j < 9; j++)
{
+ for (int i = 0; i < DrawCnt[j]; i++)
+ {
- int Nr = Draw[j] + i;
- int XPos = StartX + (j * 45);
- int YPos = 0;
+ int Nr = Draw[j] + i;
+ int XPos = StartX + (j * 45);
+ int YPos = 0;
- if (j < 5)
- YPos = StartY + (i * 37) - (19 * j);
+ if (j < 5)
+ YPos = StartY + (i * 37) - (19 * j);
- if (j > 4)
- YPos = StartY + (i * 37) - (19 * (8 - j));
+ if (j > 4)
+ YPos = StartY + (i * 37) - (19 * (8 - j));
- CreateButton(Nr, XPos, YPos, 40, 60, "#F" + Nr, "#NF" + Nr);
+ CreateButton(Nr, XPos, YPos, 40, 60, "#F" + Nr, "#NF" + Nr);
- //default navigation
- int up = Nr - 1;
- int dn = Nr + 1;
- int le = Nr - 10;
- int ri = Nr + 10;
+ //default navigation
+ int up = Nr - 1;
+ int dn = Nr + 1;
+ int le = Nr - 10;
+ int ri = Nr + 10;
- //make it easier to navigate
- if (j == 0 || j == 2 || j == 4 || j == 6 || j == 8)
- {
- le = Nr - 11;
- ri = Nr + 11;
- }
- //block to top
- if (i == 0)
- up = Nr;
- //block to bottom
- if (i == (DrawCnt[j]-1))
- dn = Nr;
- //goto to start on left side
- if (j == 0)
- le = 2;
- //block to right
- if (j == 8)
- ri = Nr;
- // some exeption top row
- if (i==0)
- {
- if (j == 2 || j == 4)
+ //make it easier to navigate
+ if (j == 0 || j == 2 || j == 4 || j == 6 || j == 8)
{
- le = Nr - 10;
+ le = Nr - 11;
+ ri = Nr + 11;
}
- if (j == 5 || j==7)
+ //block to top
+ if (i == 0)
+ up = Nr;
+ //block to bottom
+ if (i == (DrawCnt[j] - 1))
+ dn = Nr;
+ //goto to start on left side
+ if (j == 0)
+ le = 2;
+ //block to right
+ if (j == 8)
+ ri = Nr;
+ // some exeption top row
+ if (i == 0)
{
- ri = Nr + 11 ;
+ if (j == 2 || j == 4)
+ {
+ le = Nr - 10;
+ }
+ if (j == 5 || j == 7)
+ {
+ ri = Nr + 11;
+ }
}
+ // some exeption bottom row
+ if ((i == 5 && j == 1) || (i == 7 && j == 3))
+ le = Nr - 11;
+ if ((i == 8 && j == 4) || (i == 6 && j == 6))
+ ri = Nr + 10;
+
+ //SetNavigation(U, D, L, R)
+ GetControl(Nr).SetNavigation(up, dn, le, ri);
+
}
- // some exeption bottom row
- if ((i==5 && j==1) || (i==7 && j==3))
- le = Nr - 11;
- if ((i==8 && j==4) || (i==6 && j==6))
- ri = Nr + 10;
-
- //SetNavigation(U, D, L, R)
- GetControl(Nr).SetNavigation(up, dn, le, ri);
-
}
}
+
- // Disable some buttons
- GUIControl.DisableControl(GetID, 56);
- GUIControl.DisableControl(GetID, 65);
- GUIControl.DisableControl(GetID, 77);
+ // Disable level control
+ GUIControl.DisableControl(GetID, 4);
// Draw field
+ ResetBoard();
+ SetLevel();
+ Count();
UpdateBoard();
}
@@ -304,33 +336,30 @@
{
if (control == BtnWhatsThis)
OnBtnWhatsThis();
+ if (control == BtnUndo)
+ OnBtnUndo();
+ if (control == BtnBoard)
+ OnBtnBoard();
if (control == BtnStart)
{
ActPly = 4; // Player 1 starts
round = 1; // reset round counter
- // clear board
- for (int i = 22; i < 111; i++)
- {
- if (board[i] > 1)
- board[i] = 1;
- }
+ time = 0;
- // Set first tokens
- board[22] = 4;
- board[70] = 4;
- board[106] = 4;
- board[26] = 6;
- board[62] = 6;
- board[110] = 6;
+ ResetBoard();
+ SetLevel();
- // reset score
- cntPly1 = 3;
- cntPly2 = 3;
+ Count();
+ for (int i = 0; i < 133; i++)
+ {
+ rem_board[0,i] = board [i];
+ }
+
// draw field
UpdateBoard();
-
+
}
if (control == BtnLevel)
OnBtnLevel();
@@ -340,8 +369,10 @@
// check if some has clicked
if (board[controlId] == ActPly)
{
- if (ActPly == 4 || (ActPly == 6 && Mode=="2p"))
- Select(ActPly, controlId);
+ if (ActPly == 4 || (ActPly == 6 && Mode == "2p"))
+ {
+ Select(ActPly, controlId);
+ }
}
if (board[controlId] == 2 || board[controlId] == 3)
Move(ActPly, controlId);
@@ -362,6 +393,25 @@
void _Game_Tick(object sender, EventArgs e)
{
+
+ if ((ActPly > 0) && (round>1))
+ time++;
+ if (round <=1)
+ time = 0;
+
+
+ GUIPropertyManager.SetProperty("#Time", "Time: " + (time/10).ToString() + "s");
+
+
+ if ((round > 1) && (ActPly!=0))
+ {
+ GUIControl.EnableControl(GetID, 10); // Undo
+ }
+ else
+ {
+ GUIControl.DisableControl(GetID, 10); // Undo
+ }
+
// wait some time
if (wait > 0)
wait = wait - 1;
@@ -372,6 +422,69 @@
// move the computer
CompSelect();
}
+
+ // ------------------------------------------------
+ // animation 01
+
+ if ((ani01[0] != 0) && (ani01[7] > 0))
+ {
+ int tmp;
+ // select different color
+ if (board[ani01[0]]== player)
+ {
+ tmp = computer;
+ }
+ else
+ {
+ tmp = player;
+ }
+
+ // last animation
+ if (ani01[7] == 1)
+ {
+ tmp = ani01[06];
+ }
+
+ // set board take over
+ for (int i = 0; i < 6; i++)
+ {
+ if (board[ani01[i]] != 0)
+ {
+ board[ani01[i]] = tmp;
+ }
+ }
+ UpdateBoard();
+ ani01[7]--;
+ }
+ // ------------------------------------------------
+ // animation 02
+
+ if ((ani02[0] != 0) && (ani02[2] > 0))
+ {
+ int tmp;
+ // select different
+ if (board[ani02[0]] != 1)
+ {
+ tmp = 1;
+ }
+ else
+ {
+ tmp = ani02[1];
+ }
+
+ // last animation
+ if (ani02[2] == 1)
+ {
+ tmp = ani02[01];
+ }
+
+ board[ani02[0]] = tmp;
+
+ UpdateBoard();
+ ani02[2]--;
+
+ }
+
}
private void UpdateBoard()
@@ -414,6 +527,11 @@
GUIPropertyManager.SetProperty("#F" + i, @"\Hexxagon\MyHexx07F.png");
GUIPropertyManager.SetProperty("#NF" + i, @"\Hexxagon\MyHexx07.png");
}
+ if (board[i] == 10)
+ {
+ GUIPropertyManager.SetProperty("#F" + i, @"\Hexxagon\MyHexx0X.png");
+ GUIPropertyManager.SetProperty("#NF" + i, @"\Hexxagon\MyHexx0X.png");
+ }
if (ActPly == 4)
GUIPropertyManager.SetProperty("#Player", "Player 1");
if (ActPly == 6)
@@ -431,7 +549,7 @@
GUIPropertyManager.SetProperty("#Ply1.Percentage", p1.ToString());
GUIPropertyManager.SetProperty("#Ply2.Percentage", p2.ToString());
- GUIPropertyManager.SetProperty("#Round", "Round: " + round);
+ GUIPropertyManager.SetProperty("#Round", "Round: " + round.ToString());
}
}
@@ -481,6 +599,11 @@
{
// double
board[pos] = ply;
+
+ ani02[0] = pos;
+ ani02[1] = ply;
+ ani02[2] = 10;
+
Check(ply, pos);
MediaPortal.Util.Utils.PlaySound("HexxDouble.wav", false, true);
}
@@ -489,6 +612,11 @@
// jump
board[lastHexx] = 1;
board[pos] = ply;
+
+ ani02[0] = pos;
+ ani02[1] = ply;
+ ani02[2] = 10;
+
Check(ply, pos);
MediaPortal.Util.Utils.PlaySound("HexxMove.wav", false, true);
}
@@ -515,7 +643,14 @@
private void Check(int ply, int pos)
{
- bool signal = false;
+ int cnt = 0;
+ // reset ani
+ for (int i = 0; i < 6; i++)
+ {
+ ani01[i] = 0;
+ }
+ // remember player
+ ani01[6] = ply;
// after move turn arround all surrounding tokens
for (int i = 0; i < 6; i++)
@@ -525,8 +660,12 @@
if (board[pos + MoveDouble[i]] == next)
{
+ //SetFlowDirection board
board[pos + MoveDouble[i]] = ply;
- signal = true;
+ // set values for animation
+ ani01[7] = 10; // counter for animation
+ ani01[cnt]=pos + MoveDouble[i];
+ cnt++;
}
}
}
@@ -537,12 +676,18 @@
{
ActPly = 6;
wait = 25;
- //CompSelect();
}
else
{
ActPly = 4;
+
+ for (int i = 0; i < 133; i++)
+ {
+ rem_board[round, i] = board[i];
+ }
+
round = round + 1;
+
}
// check if there is a move left
NoMove(ActPly);
@@ -595,17 +740,7 @@
}
}
- // set counter to 0
- cntPly1 = 0;
- cntPly2 = 0;
- //count all fields
- for (int j = 22; j < 111; j++)
- {
- if (board[j] == 4 || board[j] == 5)
- cntPly1 = cntPly1 + 1;
- if (board[j] == 6 || board[j] == 7)
- cntPly2 = cntPly2 + 1;
- }
+ Count();
UpdateBoard();
// set message for game over
@@ -733,6 +868,11 @@
// Count attacks for each move
attackCount++;
}
+ if (board[tryDest + MoveDouble[k]] == 1)
+ {
+ // Count attacks for each move
+ attackCount = attackCount + 0.1;
+ }
}
}
if (attackCount>=highestRanking)
@@ -781,8 +921,9 @@
"board games of strategy, loosely based upon\n" +
"Othello and Attaxx!. The original version was\n" +
"written in 1992 by Argo Games, and has been\n" +
- "updated for the web by Neave. Finally I updated\n" +
- "it for th MP.\n\n" +
+ "updated for the web by Neave.\n" +
+ "http://www.neave.com/games/\n\n" +
+ "Finally I updated it for the MP\n\n" +
"Game board design by Mikael S\xF6derstr\xF6m\n\n" +
"YOUR AIM: To take over the world! You can\n" +
"choose to play against the computer, or\n" +
@@ -790,12 +931,13 @@
"two types of move, a jump or double, indicated\n" +
"hexxagon occupied by an opponent's piece will\n" +
"transform them into yours.\n\n" +
- "Good luck\nkroko");
+ "Good luck\nMark Koenig (kroko)");
dlg.DoModal(GetID);
}
private void OnBtnLevel()
{ //Choose level for the game
+
if (ActPly == 0 || (round==1 && ActPly == player ))
{
if (Level == "Nor")
@@ -825,18 +967,278 @@
GUIControl.SetControlLabel(GetID, BtnMode.GetID, "Mode: Play vs Computer");
Mode = "1p";
// Enable level selection
- GUIControl.EnableControl(GetID, 4);
+ //GUIControl.EnableControl(GetID, 4);
}
else
{
GUIControl.SetControlLabel(GetID, BtnMode.GetID, "Mode: Play vs Player");
Mode = "2p";
// Disable level selection
- GUIControl.DisableControl(GetID, 4);
+ //GUIControl.DisableControl(GetID, 4);
}
}
}
+ private void OnBtnBoard()
+ { //Choose mode for the game
+ if (ActPly == 0 || (round == 1 && ActPly == player))
+ {
+ switch (boardNo)
+ {
+ case 1:
+ boardNo = 2;
+ break;
+ case 2:
+ boardNo = 3;
+ break;
+ case 3:
+ boardNo = 4;
+ break;
+ case 4:
+ boardNo = 5;
+ break;
+ case 5:
+ boardNo = 1;
+ break;
+ }
+ GUIControl.SetControlLabel(GetID, BtnBoard.GetID, "Board: " + boardNo.ToString());
+
+ ResetBoard();
+ SetLevel();
+ Count();
+ UpdateBoard();
+
+ }
+ }
+
+ private void OnBtnUndo()
+ {
+ if (round > 1)
+ {
+ for (int i = 0; i < 133; i++)
+ {
+ board[i] = rem_board[round - 2, i];
+ }
+ round = round - 1;
+ ActPly = player;
+ Count();
+ UpdateBoard();
+ }
+ }
+
+ private void Count()
+ {
+ // set counter to 0
+ cntPly1 = 0;
+ cntPly2 = 0;
+ //count all fields
+ for (int j = 22; j < 111; j++)
+ {
+ if (board[j] == 4 || board[j] == 5)
+ cntPly1 = cntPly1 + 1;
+ if (board[j] == 6 || board[j] == 7)
+ cntPly2 = cntPly2 + 1;
+ }
+ }
+
+ private void ResetBoard()
+ {
+ for (int i = 22; i <= 26; i++)
+ {
+ board[i] = 1;
+ GUIControl.EnableControl(GetID, i);
+ }
+ for (int i = 32; i <= 37; i++)
+ {
+ board[i] = 1;
+ GUIControl.EnableControl(GetID, i);
+ }
+ for (int i = 42; i <= 48; i++)
+ {
+ board[i] = 1;
+ GUIControl.EnableControl(GetID, i);
+ }
+ for (int i = 52; i <= 59; i++)
+ {
+ board[i] = 1;
+ GUIControl.EnableControl(GetID, i);
+ }
+ for (int i = 62; i <= 70; i++)
+ {
+ board[i] = 1;
+ GUIControl.EnableControl(GetID, i);
+ }
+ for (int i = 73; i <= 80; i++)
+ {
+ board[i] = 1;
+ GUIControl.EnableControl(GetID, i);
+ }
+ for (int i = 84; i <= 90; i++)
+ {
+ board[i] = 1;
+ GUIControl.EnableControl(GetID, i);
+ }
+ for (int i = 95; i <= 100; i++)
+ {
+ board[i] = 1;
+ GUIControl.EnableControl(GetID, i);
+ }
+ for (int i = 106; i <= 110; i++)
+ {
+ board[i] = 1;
+ GUIControl.EnableControl(GetID, i);
+ }
+ }
+
+ private void SetLevel()
+ {
+ GetControl(98).SetNavigation(97, 99, 88, 108);
+
+ GetControl(64).SetNavigation(63, 65, 54, 74);
+
+ switch(boardNo)
+ {
+ case 1:
+ GUIControl.DisableControl(GetID, 56);
+ GUIControl.DisableControl(GetID, 65);
+ GUIControl.DisableControl(GetID, 77);
+ board[56] = 10;
+ board[65] = 10;
+ board[77] = 10;
+
+ board[22] = 4;
+ board[70] = 4;
+ board[106] = 4;
+ board[26] = 6;
+ board[62] = 6;
+ board[110] = 6;
+ break;
+ case 2:
+ board[22] = 4;
+ board[70] = 4;
+ board[106] = 4;
+ board[26] = 6;
+ board[62] = 6;
+ board[110] = 6;
+ break;
+ case 3:
+ GetControl(98).SetNavigation(97, 99, 88, 98);
+ GUIControl.DisableControl(GetID, 24);
+ GUIControl.DisableControl(GetID, 66);
+ GUIControl.DisableControl(GetID, 108);
+ GUIControl.DisableControl(GetID, 44);
+ GUIControl.DisableControl(GetID, 64);
+ GUIControl.DisableControl(GetID, 86);
+ GUIControl.DisableControl(GetID, 46);
+ GUIControl.DisableControl(GetID, 68);
+ GUIControl.DisableControl(GetID, 88);
+
+ board[24] = 10;
+ board[66] = 10;
+ board[108] = 10;
+ board[44] = 10;
+ board[64] = 10;
+ board[86] = 10;
+ board[46] = 10;
+ board[68] = 10;
+ board[88] = 10;
+
+ board[65] = 4;
+ board[67] = 4;
+ board[55] = 4;
+ board[56] = 4;
+ board[76] = 4;
+ board[77] = 4;
+
+ board[22] = 6;
+ board[62] = 6;
+ board[106] = 6;
+ board[26] = 6;
+ board[70] = 6;
+ board[110] = 6;
+ break;
+ case 4:
+ GetControl(64).SetNavigation(64, 65, 54, 74); // block UP
+ GUIControl.DisableControl(GetID, 62);
+ GUIControl.DisableControl(GetID, 43);
+ GUIControl.DisableControl(GetID, 63);
+ GUIControl.DisableControl(GetID, 85);
+ GUIControl.DisableControl(GetID, 105);
+ GUIControl.DisableControl(GetID, 34);
+ GUIControl.DisableControl(GetID, 55);
+ GUIControl.DisableControl(GetID, 76);
+ GUIControl.DisableControl(GetID, 97);
+ GUIControl.DisableControl(GetID, 56);
+ GUIControl.DisableControl(GetID, 67);
+ GUIControl.DisableControl(GetID, 77);
+ GUIControl.DisableControl(GetID, 36);
+ GUIControl.DisableControl(GetID, 58);
+ GUIControl.DisableControl(GetID, 79);
+ GUIControl.DisableControl(GetID, 99);
+ GUIControl.DisableControl(GetID, 70);
+
+ board[62] = 10;
+ board[43] = 10;
+ board[63] = 10;
+ board[85] = 10;
+ board[105] = 10;
+ board[34] = 10;
+ board[55] = 10;
+ board[76] = 10;
+ board[97] = 10;
+ board[56] = 10;
+ board[67] = 10;
+ board[77] = 10;
+ board[36] = 10;
+ board[58] = 10;
+ board[79] = 10;
+ board[99] = 10;
+ board[70] = 10;
+
+ board[22] = 4;
+ board[26] = 6;
+ break;
+ case 5:
+ GUIControl.DisableControl(GetID, 44);
+ GUIControl.DisableControl(GetID, 45);
+ GUIControl.DisableControl(GetID, 46);
+
+ GUIControl.DisableControl(GetID, 86);
+ GUIControl.DisableControl(GetID, 87);
+ GUIControl.DisableControl(GetID, 88);
+
+ GUIControl.DisableControl(GetID, 54);
+ GUIControl.DisableControl(GetID, 64);
+ GUIControl.DisableControl(GetID, 75);
+
+ GUIControl.DisableControl(GetID, 57);
+ GUIControl.DisableControl(GetID, 68);
+ GUIControl.DisableControl(GetID, 78);
+
+ board[44] = 10;
+ board[45] = 10;
+ board[46] = 10;
+ board[86] = 10;
+ board[87] = 10;
+ board[88] = 10;
+
+ board[54] = 10;
+ board[64] = 10;
+ board[75] = 10;
+
+ board[57] = 10;
+ board[68] = 10;
+ board[78] = 10;
+
+ board[24] = 4;
+ board[108] = 6;
+
+ board[62] = 6;
+ board[70] = 4;
+ break;
+ }
+ }
+
}
}
\ No newline at end of file
Modified: trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.csproj
===================================================================
--- trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.csproj 2007-05-24 19:27:07 UTC (rev 428)
+++ trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.csproj 2007-05-24 20:05:15 UTC (rev 429)
@@ -21,7 +21,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
+ <Optimize>false</Optimize>
<OutputPath>..\..\..\..\..\Programme\Team MediaPortal\MediaPortal\Plugins\Windows\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
@@ -42,11 +42,22 @@
<Reference Include="System.Data" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
+ <Reference Include="Utils, Version=1.0.2546.32604, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\Programme\Team MediaPortal\MediaPortal\Utils.DLL</HintPath>
+ <Private>False</Private>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MyHexxagon.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="hexxagon.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="hexxagonDisabled.png" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Added: trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.csproj.user
===================================================================
--- trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.csproj.user (rev 0)
+++ trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.csproj.user 2007-05-24 20:05:15 UTC (rev 429)
@@ -0,0 +1,9 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <StartAction>Program</StartAction>
+ <StartProgram>C:\Programme\Team MediaPortal\MediaPortal\MediaPortal.exe</StartProgram>
+ </PropertyGroup>
+ <PropertyGroup>
+ <ReferencePath>C:\Programme\Team MediaPortal\MediaPortal\;C:\Programme\Team MediaPortal\MediaPortal\Plugins\</ReferencePath>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Deleted: trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.xml
===================================================================
--- trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.xml 2007-05-24 19:27:07 UTC (rev 428)
+++ trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/MyHexxagon.xml 2007-05-24 20:05:15 UTC (rev 429)
@@ -1,151 +0,0 @@
-<window>
- <id>1234711</id>
- <defaultcontrol>2</defaultcontrol>
- <allowoverlay>yes</allowoverlay>
- <autohidetopbar>yes</autohidetopbar>
- <controls>
- <import>common.time.xml</import>
- <control>
- <description>BackGround</description>
- <type>image</type>
- <id>1</id>
- <posX>0</posX>
- <posY>0</posY>
- <width>720</width>
- <height>576</height>
- <texture>background.png</texture>
- </control>
- <control>
- <description>text label</description>
- <type>label</type>
- <id>11</id>
- <posX>60</posX>
- <posY>70</posY>
- <label>Hexxagon</label>
- <font>font16</font>
- <align>Left</align>
- <textcolor>ffffffff</textcolor>
- <animation effect="fade" time="150">WindowOpen</animation>
- <animation effect="fade" time="150">WindowClose</animation>
- </control>
- <control>
- <description>Start</description>
- <type>button</type>
- <id>2</id>
- <posX>60</posX>
- <posY>97</posY>
- <label>Start</label>
- <onleft>2</onleft>
- <onright>2</onright>
- <onup>6</onup>
- <ondown>3</ondown>
- <animation effect="fade" time="150">WindowOpen</animation>
- <animation effect="fade" time="150">WindowClose</animation>
- </control>
- <control>
- <description>Level</description>
- <type>button</type>
- <id>3</id>
- <posX>60</posX>
- <posY>131</posY>
- <label>Level: Amateur</label>
- <onleft>3</onleft>
- <onright>3</onright>
- <onup>2</onup>
- <ondown>6</ondown>
- <animation effect="fade" time="150">WindowOpen</animation>
- <animation effect="fade" time="150">WindowClose</animation>
- </control>
- <control>
- <description>text label</description>
- <type>label</type>
- <id>4</id>
- <posX>70</posX>
- <posY>170</posY>
- <label>#Round</label>
- <font>font12</font>
- <align>Left</align>
- <textcolor>ffffffff</textcolor>
- <animation effect="fade" time="150">WindowOpen</animation>
- <animation effect="fade" time="150">WindowClose</animation>
- </control>
- <control>
- <description>text label</description>
- <type>label</type>
- <id>4</id>
- <posX>70</posX>
- <posY>204</posY>
- <label>#Player</label>
- <font>font12</font>
- <align>Left</align>
- <textcolor>ffffffff</textcolor>
- <animation effect="fade" time="150">WindowOpen</animation>
- <animation effect="fade" time="150">WindowClose</animation>
- </control>
- <control>
- <description>Whatsthis</description>
- <type>button</type>
- <id>6</id>
- <posX>60</posX>
- <posY>233</posY>
- <label>What's this?</label>
- <onleft>6</onleft>
- <onright>6</onright>
- <onup>3</onup>
- <ondown>2</ondown>
- <animation effect="fade" time="150">WindowOpen</animation>
- <animation effect="fade" time="150">WindowClose</animation>
- </control>
-
- <control>
- <description>text label</description>
- <type>label</type>
- <id>12</id>
- <posX>70</posX>
- <posY>280</posY>
- <label>#Ply1.Count</label>
- <font>font12</font>
- <align>Left</align>
- <textcolor>ff000000</textcolor>
- <animation effect="fade" time="150">WindowOpen</animation>
- <animation effect="fade" time="150">WindowClose</animation>
- </control>
- <control>
- <description>text label</description>
- <type>label</type>
- <id>13</id>
- <posX>70</posX>
- <posY>310</posY>
- <label>#Ply2.Count</label>
- <font>font12</font>
- <align>Left</align>
- <textcolor>ffffffff</textcolor>
- <animation effect="fade" time="150">WindowOpen</animation>
- <animation effect="fade" time="150">WindowClose</animation>
- </control>
- <control>
- <description>progress bar</description>
- <type>progress</type>
- <id>8</id>
- <posX>100</posX>
- <posY>280</posY>
- <width>180</width>
- <label>#Ply1.Percentage</label>
- <visible>yes</visible>
- <animation effect="fade" time="250">WindowOpen</animation>
- <animation effect="fade" time="500">WindowClose</animation>
- </control>
- <control>
- <description>progress bar</description>
- <type>progress</type>
- <id>9</id>
- <posX>100</posX>
- <posY>310</posY>
- <width>180</width>
- <label>#Ply2.Percentage</label>
- <visible>yes</visible>
- <animation effect="fade" time="250">WindowOpen</animation>
- <animation effect="fade" time="500">WindowClose</animation>
- </control>
- </controls>
-</window>
Modified: trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/Properties/AssemblyInfo.cs 2007-05-24 19:27:07 UTC (rev 428)
+++ trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/Properties/AssemblyInfo.cs 2007-05-24 20:05:15 UTC (rev 429)
@@ -31,5 +31,5 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern
// übernehmen, indem Sie "*" eingeben:
-[assembly: AssemblyVersion("0.1.0.0")]
-[assembly: AssemblyFileVersion("0.1.0.0")]
+[assembly: AssemblyVersion("0.3.0.0")]
+[assembly: AssemblyFileVersion("0.3.0.0")]
Added: trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/hexxagon.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/hexxagon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/hexxagonDisabled.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon/hexxagonDisabled.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/plugins/My Hexxagon/Source/MyHexxagon/MyHexxagon.suo
===================================================================
(Binary files differ)
Modified: trunk/plugins/My Hexxagon/hexxagon.jpg
===================================================================
(Binary files differ)
Modified: trunk/plugins/My Hexxagon/readme.txt
===================================================================
--- trunk/plugins/My Hexxagon/readme.txt 2007-05-24 19:27:07 UTC (rev 428)
+++ trunk/plugins/My Hexxagon/readme.txt 2007-05-24 20:05:15 UTC (rev 429)
@@ -3,6 +3,22 @@
Hexxagon
--------
+V0.3
+-5 board to play
+-small bugfix in the AI for new boards
+
+V0.21
+-fixed a bug add buttons to form (thanks mikael)
+-add a hidden button for the layout (cedric)
+-fixed small bug Undo/count (just my fault)
+
+V0.2
+
+-Undo button
+-nice icon in configuration
+-some animations( very basic)
+
+V0.1
-Initial release
-1 and 2 player support
-Gameboard design by Mikael S\xF6derstr\xF6m for the SimpleMP
@@ -32,11 +48,4 @@
transform them into yours.
Good luck
-kroko
-
-
-
-Have fun.
-
-Greetz
-kroko
\ No newline at end of file
+Mark Koenig (kroko)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|