There is a download available containing the source, however if you plan to modify it and contribute to our project, we recommend you check it out from CVS.
simplegamenet
is used to refer to the project root's,
meaning the directory in which you 've done a checkout from CVS (or unzipped the source),
for example
c:\simplegamenet
.
You 'll find a
project.xml
and
LICENSE.TXT
file in there.
/
is used to refer to your platforms directory seperator.
On windows this should be replaced with
\
.
To open the project in IntelliJ or Eclipse you 'll need a configuration file for your IDE.
For IntelliJ you 'll need a
.ipr
,
.iml
and
.iws
file.
You could configure a new project in IntelliJ, but if you are lazy like me,
you 'll just open the command shell, navigate to the project root directory
and run a maven goal:
maven idea
IntelliJ's IDE is officially called IntelliJ IDEA,
which explains the name
idea
of maven's goal.
Now simply open the
simplegamenet/simplegamenet.ipr
file with IntelliJ.
Open
File/Settings/Paths and add every
simplegamenet/*/src/java
and
simplegamenet/*/src/resources
as a source path.
For example:
simplegamenet/framework/src/java
.
In your IDE, configure the MavenConsolePlugin to use
simplegamenet/project.xml
.
Do not use the project file of one of the several game modules,
such as
simplegamenet/chess/project.xml
.
The main project calls those recursively.
You can now type in a goal name to run it with the Maven plugin.
For example run
multiproject:install
Alternatively, you can keep calling it from the command line, for example:
maven multiproject:install
Run the goal
sgn:build
to build SGN.
Remember you can run the goal on the command line with
maven sgn:build
or even better from the MavenConsolePlugin in your IDE by directly typing in the goal name.
Maven will create a directory called
target
,
which contains the compiled classes, jars, docs, etc.
In your file explorer you should find:
simplegamenet/target/simplegamenet-framework-<version>.jar
simplegamenet/target/simplegamenet-specs-<version>.jar
simplegamenet/target/simplegamenet-util-<version>.jar
simplegamenet/target/games/simplegamenet-chess-<version>.jar
simplegamenet/target/games/simplegamenet-connectaline-<version>.jar
simplegamenet/target/games/simplegamenet-dice-<version>.jar
You can delete a
target
directory at any time.
It only contains generated files (such as classes, jars, html, pdf)
while other directories don't contain a single generated file.
Never commit a
target
directory to CVS.
In your filesystem explorer you can just open
simplegamenet/target/simplegamenet-framework-<version>.jar
.
If an archiver tool, such as WinZip, has stolen the .jar extension, that won't work.
In that case you can run it from the command shell like:
java -jar simplegamenet-framework-<version>.jar
To run the project in IntelliJ, open Run/Edit Configurations/Application. Add a new application configuration with:
net.sourceforge.simplegamenet.StaticLoadingMain
Now you 'll be able to run and even debug SGN with IntelliJ.
Try adding some line breakpoints in the source (click on the left side of a line),
call
Run/Debug to see the power of debugging.
Once a breakpoint is hit, you will able to see all variables.
You can even set conditional breakpoints.
Who would want to go back to
System.out.println
?