Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
fred4106
fred4106's Profile
2
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
resizing the window in the draw() function
[3 Replies]
08-Aug-2012 07:27 PM
Forum:
General Discussion
my program loops through images and draws them to the screen. It is supposed to get rid of the black border and resave them. I have the logic to detect how much to cut and how to resave it. How would i resize the window? thanks.
NullPointer exception with recursion
[1 Reply]
01-Aug-2012 12:25 PM
Forum:
Programming Questions
public gameState s = new gameState("---------");
public void setup()
{
size(300, 300);
s.getChildBoards(true);
}
public void draw()
{
background(0);
}
class gameState
{
public String board;
ArrayList children;
public gameState(String board_)
{
board = board_;
print(board);
}
public void getChildBoards(boolean turn)
{
char player;
char[] bArray = board.toCharArray();
if(turn)
{
player = 'x';
}
else
{
player = 'o';
}
for(int a = 0; a < 9; a++)
{
char[] bArray_ = bArray;
if(bArray[a] == '-')
{
bArray_[a] = player;
children.add(new gameState("---------"));
}
}
}
i get the error at line 49... Thanks for any help :)
«Prev
Next »
Moderate user : fred4106
Forum