Asked — Edited

Tic-Tac-Toe Plugin

DJ,

Would I be correct that when playing this game of Tic-Tac-Toe that you are not really playing against the robot but against the PC ARC Program?

I can have the robot disconnected and the game plays on. Works no matter if you are connected to the robot or not?

Also noticed that sometimes the program locks up when it is the robot/computer's turn to move?

I realize this isn't a big deal but just curious why it locks up sometimes and am I correct in the assumption that you really don't need the robot connected to play the game?

Thanks Again For The Clarification ! Rick :) :)


ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

#1  

You do know the robot you're talking about is the software ARC, right? The ezb4 is just "a controller", a mighty fine one but nevertheless still just a controller.... All the magic happens in ARC on your PC or smart phone....

To sum it up, ARC is the "robot"... JD, Roli and Six and all other ezb4 dyi robots are just empty hardware shells until connected to ARC.... ARC does all the work...

So when you're planning tic tac toe you are playing against ARC....

#2  

Hello Richard,

I did pick up on the fact that I was playing against ARC.

The main issue I was concerned about is that when it was the robots turn to move sometimes it would hang up the program and I would have to restart the game.

Not sure if anyone else has experienced this or if it might have something to do with the lattest version of ARC? If anyone else has experienced this please comment.

Not a big deal but curious to hear if others have experienced this? Thanks Much ! Rick

PRO
USA
#3  

Rick,

It's a small bug in the Game logic, nothing related to ARC.

relevant code line 407:


            else if (_boardArray[2, 0] == BoardSquareEnum.empty && _boardArray[1, 1] == player && _boardArray[0, 2] == player)
            {
                
                col = 2;
                row = 2;

                return true;
            }


correction:


            else if (_boardArray[2, 0] == BoardSquareEnum.empty && _boardArray[1, 1] == player && _boardArray[0, 2] == player)
            {
                
                col = 2;
                row = 0; //previous 2 correct 0

                return true;
            }


It's not a bug is an undocumented feature... student exercise to find the bug

#4  

Thanks ptp,

How do you view the code to look at it and change it? Do you need to view code in a C# compiler or just a text editor. Not familiar with plugins. I did briefly look through the plugin tutorial but didn't spend much time on it. Your thoughts on this are appreciated ! Looking forward to your reply as always ! Rick :)

PRO
USA
#5  
  1. A plugin is a binary package containing binary .net assemblies plus other resources e.g. images, text files etc.

  2. When releasing a plugin you are not forced to release the source code.

  3. The Tic Tac Toe plugin's has the code available (look in the details) you will find a zip file in the bottom

  4. Unzip the file, and you can use a Microsoft Visual Studio 2013/+ to open the solution (.sln) file

  5. If you don't have a VS and you are only curious to check the code (like i did) you look for the (.cs) c# code files.

  6. you can open the MainForm.cs file is the "Main" plugin code

  7. you will find several functions/methods and you can go straight to the logic code:

getAction(BoardSquareEnum player, out int col, out int row)

DJ's code for the next move.

good luck :)

  1. if you want to fix or tweak you will need the Visual Studio to compile the plugin and only then you can use the compiled binary.
#6  

Hello PTP,

Any chance that I could get an updated version of this plugin now that I know what the fix is? I will eventually get into the plugin side of things but too many priorities ahead of it. Thanks again for all your great help ! Rick :)

PRO
USA
#7  

No problem

compiled plugin zip:

TicTacToe.zip

Please pay attention to:

  1. When you download zips from the internet, windows downloads the file but keeps a "blocked" flag

http://www.thewindowsclub.com/fix-windows-blocked-access-file

It's important to remove the blocked flag before unzipping the file otherwise the blocked flag will be replicated to the zip content. Some applications will be affected if a specific file has the blocked flag.

  1. unzip the file and copy the content to the existent tic tac toe plugin folder:

C:\Users\Public\Documents\EZ-Builder\Plugins\216dec27-0f51-4b3c-a8f9-eb98167d8c07

Good Luck.

#8  

Hello PTP,

Does Windows 7 have this same issue with blocked files. I would assume probably so? Also the path above in the plugins folder has a large number in it. Is this the number of the file for the new tic-tac-toe file or will the number I see from the download be the dame as the long number above? Thanks again for your help ! Rick :)

PRO
USA
#9  

Rick:

  1. The plugins folder is:

C:\Users\Public\Documents\EZ-Builder\Plugins\

  1. The tick-tack-toe plugin folder is:

C:\Users\Public\Documents\EZ-Builder\Plugins\216dec27-0f51-4b3c-a8f9-eb98167d8c07

The zip file when restored will create a folder "216dec27-0f51-4b3c-a8f9-eb98167d8c07" you have two options:

  1. copy unzipped folder to the plugins folder and replace the content (old plugin bins)

  2. or navigate to the unzipped folder and copy the content to the Tic-tac-toe plugin.

I personally like to navigate all the folders down and copy the content, option 2.

I think windows 10 is a checkbox versus a button on windows 8:

http://www.tenforums.com/tutorials/5357-unblock-file-windows-10-a.html

#10  

Hello ptp,

I got you about windows 10 but was wondering about blocked files in Windows 7? Thanks much again ! Rick :)

PRO
USA
#11  

my bad... i'm procrastinating for a few weeks the windows 10 update....

windows 10 is in back of my head...

yes windows 7 also has the unblock button.