I'm porting some code of a game I found on the web to C. It was written in Visual Basic 2005.
It goes a little something like..
Code:
Try
Do
'code block
Loop Until Not Change
Catch ex As Exception
Throw New Exception("invalid move")
End Try
what would I do in C...
Code:
do {
/*
more do, break, etc
*/
} while (!change);
I have an idea of what it does, but I have no idea of how to logically do such in C, let alone understand how it affects other routines that call a routine containing said code, etc.
in another routine of the game, it simply has
Code:
'---if possible value is string.Empty, then error---
If str = String.Empty Then
Throw New Exception("Invalid Move")
End If
Can anyone explain please?