TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rene Nielsen
NA
22
31.6k
Help with a class proplem
Oct 28 2010 9:30 AM
ok so i have this projekt where i have this attribute currentField in my class and i define that in my code
public
void
RollDiceAndMove()
{
Dice.Roll();
if
(oldField == 0)
oldField = 1;
currentField = oldField;
lastThrow = Dice.GetDices();
currentField = GameBoard.Move(currentField, lastThrow);
oldField = currentField;
}
when i then try in another place to go and get currentField
public
string
LandedOn()
{
board = GameBoard.GetBoard();
string
temp = board[currentField-1];
return
temp;
}
then currentField = 1 again even though i gave it a value before. it is probally easier to see what i mean if u get the full projekt
please take a look and help me because i cant seem to find the error that keeps resetting the value of it
Attachment:
Matador2.zip
Reply
Answers (
4
)
ListView Print
Thread.Sleep issue