game tree
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3078
Image Tree 1.0
Image Tree is a complete and versatile photo publishing system in less than 200 lines of code. more>>
Image Tree is a complete and versatile photo publishing system in less than 200 lines of code.
ImgTree is based only on three files:
index php : contains all the php and html code. Must be put, unmodified in every folder of the directory tree.
data.php : contains the specific settings of every folder
style.css : the css style sheet
Every folder of the folder tree must contain the three files. Clearly index.php and style.php should be simply linked:
imgtree/
|-- data.php
|-- index.php
|-- style.css
|-- Section-A
| |-- data.php
| |-- index.php -> ../index.php
| |-- style.css -> ../style.css
| |-- 01-thumb.jpg
| |-- 01.jpg
| |-- 02-thumb.jpg
| |-- 02.jpg
| `-- ...
`-- Section-B
|-- data.php
|-- index.php -> ../index.php
|-- style.css -> ../style.css
|-- 00.jpg
|-- Subsection-B1
| |-- data.php
| |-- index.php -> ../index.php
| `-- style.css -> ../style.css
| |-- cover.jpg
`-- Subsection-B2
|-- data.php
|-- index.php -> ../index.php
|-- style.css -> ../style.css
|-- 01-thumb.jpg
|-- 01.jpg
|-- 02-thumb.jpg
|-- 02.jpg
`-- ...
Every folder act as a section and the behaviour can be choose between:
index : Contains a list of links to every subfolder of the current folder. For every section an image and a description are shown.
thumb : Thumbnails page. Shows every image file of the folder. Thumbnail must be named "xxx-thumb.jpg" for the xxx.jpg file. Ex: 01-thumb.jpg -> 01.jpg ; tramonto-thumb.jpg -> tramonto.jpg ; ecc.
cover : Cover page. Shows an image, a text and an associated link
The file data.php contin the settings specific for every section:
$gallerystart : is the gallery start to generate the back-menu. The path must be relative to the starting folder of the site
$name : name used to link the current section in the menus
$title : page title
$description: description, used as subtitle and for brief description in index pages
$indeximage : image used in index pages to link this section
$type : type of the page (cover|thumb|index)
$imgtitle : associtive array of the images descriptions. Used only by "thumb" pages
$coverimage : image used by "cover" pages
$covertext : text used by "cover" pages
$coverlink= : link used by "cover" pages
$covertitle : title used by "cover" pages
NEEDS a web server (Apache or similar) with PHP support
<<lessImgTree is based only on three files:
index php : contains all the php and html code. Must be put, unmodified in every folder of the directory tree.
data.php : contains the specific settings of every folder
style.css : the css style sheet
Every folder of the folder tree must contain the three files. Clearly index.php and style.php should be simply linked:
imgtree/
|-- data.php
|-- index.php
|-- style.css
|-- Section-A
| |-- data.php
| |-- index.php -> ../index.php
| |-- style.css -> ../style.css
| |-- 01-thumb.jpg
| |-- 01.jpg
| |-- 02-thumb.jpg
| |-- 02.jpg
| `-- ...
`-- Section-B
|-- data.php
|-- index.php -> ../index.php
|-- style.css -> ../style.css
|-- 00.jpg
|-- Subsection-B1
| |-- data.php
| |-- index.php -> ../index.php
| `-- style.css -> ../style.css
| |-- cover.jpg
`-- Subsection-B2
|-- data.php
|-- index.php -> ../index.php
|-- style.css -> ../style.css
|-- 01-thumb.jpg
|-- 01.jpg
|-- 02-thumb.jpg
|-- 02.jpg
`-- ...
Every folder act as a section and the behaviour can be choose between:
index : Contains a list of links to every subfolder of the current folder. For every section an image and a description are shown.
thumb : Thumbnails page. Shows every image file of the folder. Thumbnail must be named "xxx-thumb.jpg" for the xxx.jpg file. Ex: 01-thumb.jpg -> 01.jpg ; tramonto-thumb.jpg -> tramonto.jpg ; ecc.
cover : Cover page. Shows an image, a text and an associated link
The file data.php contin the settings specific for every section:
$gallerystart : is the gallery start to generate the back-menu. The path must be relative to the starting folder of the site
$name : name used to link the current section in the menus
$title : page title
$description: description, used as subtitle and for brief description in index pages
$indeximage : image used in index pages to link this section
$type : type of the page (cover|thumb|index)
$imgtitle : associtive array of the images descriptions. Used only by "thumb" pages
$coverimage : image used by "cover" pages
$covertext : text used by "cover" pages
$coverlink= : link used by "cover" pages
$covertitle : title used by "cover" pages
NEEDS a web server (Apache or similar) with PHP support
Download (0.033MB)
Added: 2006-09-11 License: GPL (GNU General Public License) Price:
1139 downloads
Deluxe Tree 1.0
Deluxe Tree is a powerful, JavaScript-based site navigation menu. more>>
Deluxe Tree is a powerful, JavaScript-based site navigation menu. Deluxe Tree is a versatile, ready-made solution that allows professional and amateur Web developers to create superior navigation systems for their Web sites and Web applications.
It supports a special JavaScript API to change your menu "on-the-fly", animation effects, floating, drag-n-drop, state saving, XP Style, relative and absolute positions, animated icons and arrows, normal state, mouseover state, expanded state, unlimited submenus, separators, lines, and more.
Main features:
Compatibility
- Full cross-browser compatibility including IE, Netscape, Mozilla, Opera, Firefox, Konqueror and Safari
- on Windows, Mac OS and Linux
- Section 508 compliant
- Support for any doctypes
- Menu can be populated from a database using ASP, PHP, etc.
Seamless Integration
- Multiple menus on the same page
- Friendly to other scripts and css styles
- Any HTML code can be used within menu items
High Performance
- Generally loads faster than other page elements
- Performs perfectly with unlimited number of submenus and items
Easy Setup
- Comprehensible menu parameters for manual editing
Professional Look-n-Feel
- Fully customizable appearance, individual styles for each element
- Animation effects for submenus in XP Style
Unique Features
- Dragable, floating, state-saving menus
- Special JavaScript API for changing menu "on-the-fly"
Cost Effective
- Starts at just $39.95. Buy Now!
- Free for non-profit websites. Order Now!
- Full-functional free trial version.
Enhancements:
- Several .js modules were added.
- A special JavaScript API was added to change your menu "on-the-fly".
- New animation effects were added.
<<lessIt supports a special JavaScript API to change your menu "on-the-fly", animation effects, floating, drag-n-drop, state saving, XP Style, relative and absolute positions, animated icons and arrows, normal state, mouseover state, expanded state, unlimited submenus, separators, lines, and more.
Main features:
Compatibility
- Full cross-browser compatibility including IE, Netscape, Mozilla, Opera, Firefox, Konqueror and Safari
- on Windows, Mac OS and Linux
- Section 508 compliant
- Support for any doctypes
- Menu can be populated from a database using ASP, PHP, etc.
Seamless Integration
- Multiple menus on the same page
- Friendly to other scripts and css styles
- Any HTML code can be used within menu items
High Performance
- Generally loads faster than other page elements
- Performs perfectly with unlimited number of submenus and items
Easy Setup
- Comprehensible menu parameters for manual editing
Professional Look-n-Feel
- Fully customizable appearance, individual styles for each element
- Animation effects for submenus in XP Style
Unique Features
- Dragable, floating, state-saving menus
- Special JavaScript API for changing menu "on-the-fly"
Cost Effective
- Starts at just $39.95. Buy Now!
- Free for non-profit websites. Order Now!
- Full-functional free trial version.
Enhancements:
- Several .js modules were added.
- A special JavaScript API was added to change your menu "on-the-fly".
- New animation effects were added.
Download (0.82MB)
Added: 2006-09-18 License: Free for non-commercial use Price:
1131 downloads
gewee game 3.6
gewee game is a Go-like board game with next generation graphics. more>>
gewee game is a Go-like board game with "next generation" graphics.
This is a game between a human ("player") and a computer ("opponent"). The players objective is to accumulate as many points as possible. When the player wins a game, a point is added to his/her score. When the player loses a game, a point is subtracted from his/her score. The competitor with the most pieces on the board at the end of the game is the winner. A game is finished when a competitor forfeits, or has no valid empty square to place a piece on. The opponent is granted additional moves at the start of a game based on the players score.
Each competitor has a distinct set of pieces of the same shape and color. The competitors take turns placing one piece on an empty square on the board. A piece or group of pieces that has no empty square adjacent to it is removed from the board.
<<lessThis is a game between a human ("player") and a computer ("opponent"). The players objective is to accumulate as many points as possible. When the player wins a game, a point is added to his/her score. When the player loses a game, a point is subtracted from his/her score. The competitor with the most pieces on the board at the end of the game is the winner. A game is finished when a competitor forfeits, or has no valid empty square to place a piece on. The opponent is granted additional moves at the start of a game based on the players score.
Each competitor has a distinct set of pieces of the same shape and color. The competitors take turns placing one piece on an empty square on the board. A piece or group of pieces that has no empty square adjacent to it is removed from the board.
Download (0.018MB)
Added: 2007-05-21 License: Freeware Price:
886 downloads
Game Launcher 0.9.8
Game Launcher project is a universal front end for emulators. more>>
Game Launcher project is a universal front end for emulators.
The main goal is to provide a user interface that is easy to use and attractive, yet does not look like a traditional user interface with windows and such.
Game Launcher should work with any emulator, but it has been known to work with MAME, Nesticle, RockNES, zSNES, snes9x, Callus, Stella, z26, and Versions are available for Unix, DOS, and Windows.
Main features:
- Very flexible. It should run with any command line emulator.
- Simple and easy to use interface.
- Plays music in the background (MP3s or an audio CD).
- Displays screenshots (PNG, PCX, BMP, and JPEG).
- Customizable font.
- Customizable screen resolution.
- Support for vertical (rotated) monitors.
- Slight menu animations.
- Support for PC joysticks.
<<lessThe main goal is to provide a user interface that is easy to use and attractive, yet does not look like a traditional user interface with windows and such.
Game Launcher should work with any emulator, but it has been known to work with MAME, Nesticle, RockNES, zSNES, snes9x, Callus, Stella, z26, and Versions are available for Unix, DOS, and Windows.
Main features:
- Very flexible. It should run with any command line emulator.
- Simple and easy to use interface.
- Plays music in the background (MP3s or an audio CD).
- Displays screenshots (PNG, PCX, BMP, and JPEG).
- Customizable font.
- Customizable screen resolution.
- Support for vertical (rotated) monitors.
- Slight menu animations.
- Support for PC joysticks.
Download (0.35MB)
Added: 2006-11-14 License: GPL (GNU General Public License) Price:
1086 downloads
Generic Game-Tree Library 2.1.4
Generic Game-Tree Library is a library designed to make it easier to program games in C. more>>
GGTL is a library designed to make it easier to program games in C. Generic Game-Tree Library provides an AI that is able to play most 2 player strategic games.
Nim, Tic-Tac-Toe, Reversi (aka Othello), Connect-4 and Chess are all examples of games that can all be implemented using GGTL.
GGTL comes with game-specific extensions that enables it to play Nim and Reversi almost out of the box. Please see the documentation for details.
Enhancements:
- "clock()" is used as a fallback for sub-second timing if "gettimeofday()" is not found.
- An internal typedef was dropped, and a header declaration for a function that didnt exist was removed.
- Some build system refactoring was done.
<<lessNim, Tic-Tac-Toe, Reversi (aka Othello), Connect-4 and Chess are all examples of games that can all be implemented using GGTL.
GGTL comes with game-specific extensions that enables it to play Nim and Reversi almost out of the box. Please see the documentation for details.
Enhancements:
- "clock()" is used as a fallback for sub-second timing if "gettimeofday()" is not found.
- An internal typedef was dropped, and a header declaration for a function that didnt exist was removed.
- Some build system refactoring was done.
Download (0.25MB)
Added: 2006-12-21 License: GPL (GNU General Public License) Price:
609 downloads
STX B+ Tree 0.8
STX B+ Tree project is a set of C++ template classes implementing a B+ tree key/data container in main memory. more>>
STX B+ Tree project is a set of C++ template classes implementing a B+ tree key/data container in main memory. The classes are designed as drop-in replacements of the STL containers set, map, multiset and multimap and follow their interfaces very closely. By packing multiple value pairs into each node of the tree the B+ tree reduces heap fragmentation and utilizes cache-line effects better than the standard red-black binary tree.
The tree algorithms are based on the implementation in Cormen, Leiserson and Rivests Introduction into Algorithms, Jan Janninks paper and other algorithm resources. The classes contain extensive assertion and verification mechanisms to ensure the implementations correctness by testing the tree invariants.
The main B+ tree implementation can be found in doxygen stx/btree.h or with plain text comments btree.h.
Special interest was put into performing a speed comparison test between the standard red-black tree and the new B+ tree implementation. The speed test results are interesting and show the B+ tree to be significantly faster.
Enhancements:
- This release introduces the demonstration program wxBTreeDemo.
- This program draws illustrations of the B+ trees constructed by the STX B+ Tree template classes.
- It allows the user to select different types of B+ tree instantiations: integer or string keys and different slot numbers.
- The user may insert and erase key/data pairs from the tree and run different search operations.
- The demo program uses the cross-platform wxWidgets toolkit and can be compiled on Linux, Windows, and Mac OS X.
<<lessThe tree algorithms are based on the implementation in Cormen, Leiserson and Rivests Introduction into Algorithms, Jan Janninks paper and other algorithm resources. The classes contain extensive assertion and verification mechanisms to ensure the implementations correctness by testing the tree invariants.
The main B+ tree implementation can be found in doxygen stx/btree.h or with plain text comments btree.h.
Special interest was put into performing a speed comparison test between the standard red-black tree and the new B+ tree implementation. The speed test results are interesting and show the B+ tree to be significantly faster.
Enhancements:
- This release introduces the demonstration program wxBTreeDemo.
- This program draws illustrations of the B+ trees constructed by the STX B+ Tree template classes.
- It allows the user to select different types of B+ tree instantiations: integer or string keys and different slot numbers.
- The user may insert and erase key/data pairs from the tree and run different search operations.
- The demo program uses the cross-platform wxWidgets toolkit and can be compiled on Linux, Windows, and Mac OS X.
Download (0.36MB)
Added: 2007-05-15 License: LGPL (GNU Lesser General Public License) Price:
548 downloads
game build 1577
game is a simple Tetris-like game. more>>
game is a simple Tetris-like game.
The objective of the game is to keep the level of colored blocks down as long as possible.
New blocks are falling down at an increasing rate, blocks can be removed by creating rows of three or more blocks of the same color. The longer the row,
the more points you get.
Usage:
The objective of the game is to keep the level of colored blocks down as long as possible. New blocks are falling down at an increasing rate, blocks can be removed by creating rows of three or more blocks of the same color. The longer the row, the more points you get.
space - Flip two neighbour blocks.
arrow keys - Move cursor
h,j,k,l - Move cursor (vi-fans)
escape - Quit game, no questions asked.
s - Starts the game. If a game is in progress, a new game
will be started instantly.
p - Pause game. To avoid cheating, the game will be hidden
during pause.
e - Generate earthquake. This can be used as a last resort in
case of panic, and will remove approximately 30 blocks from
the field. It might help you. Then again, it might not.
Can be used once per game and costs 50 points.
Installation:
Linux:
Make sure the SDL, SDL_image and SDL_mixer runtime libraries are installed
$ tar -zxvf game- -linux.tgz
$ cd game
$ ./game
Enhancements:
- Added better error handling on SDL img load failures
<<lessThe objective of the game is to keep the level of colored blocks down as long as possible.
New blocks are falling down at an increasing rate, blocks can be removed by creating rows of three or more blocks of the same color. The longer the row,
the more points you get.
Usage:
The objective of the game is to keep the level of colored blocks down as long as possible. New blocks are falling down at an increasing rate, blocks can be removed by creating rows of three or more blocks of the same color. The longer the row, the more points you get.
space - Flip two neighbour blocks.
arrow keys - Move cursor
h,j,k,l - Move cursor (vi-fans)
escape - Quit game, no questions asked.
s - Starts the game. If a game is in progress, a new game
will be started instantly.
p - Pause game. To avoid cheating, the game will be hidden
during pause.
e - Generate earthquake. This can be used as a last resort in
case of panic, and will remove approximately 30 blocks from
the field. It might help you. Then again, it might not.
Can be used once per game and costs 50 points.
Installation:
Linux:
Make sure the SDL, SDL_image and SDL_mixer runtime libraries are installed
$ tar -zxvf game- -linux.tgz
$ cd game
$ ./game
Enhancements:
- Added better error handling on SDL img load failures
Download (1.2MB)
Added: 2006-07-19 License: GPL (GNU General Public License) Price:
1205 downloads
Games::Alak 0.18
Games::Alak is a simple game-tree implementation of a gomoku-like game. more>>
Games::Alak is a simple game-tree implementation of a gomoku-like game.
SYNOPSIS
% perl -MGames::Alak -e Games::Alak::play
...Or just run Alak.pm as if it were a program...
...Program responds with output, and a prompt:
Lookahead set to 3. I am X, you are O.
Enter h for help
X moves from 1 to 5, yielding .xxxx..oooo
alak>
...and now you enter the commands to play.
This module implements a simple game-tree system for the computer to play against the user in a game of Alak. You can just play the game for fun; or you can use this module as a starting point for understanding game trees (and implementing smarter strategy -- the modules current logic is fairly simple-minded), particularly after reading my Perl Journal #18 article on trees, which discusses this modules implementation of game trees as an example of general tree-shaped data structures.
<<lessSYNOPSIS
% perl -MGames::Alak -e Games::Alak::play
...Or just run Alak.pm as if it were a program...
...Program responds with output, and a prompt:
Lookahead set to 3. I am X, you are O.
Enter h for help
X moves from 1 to 5, yielding .xxxx..oooo
alak>
...and now you enter the commands to play.
This module implements a simple game-tree system for the computer to play against the user in a game of Alak. You can just play the game for fun; or you can use this module as a starting point for understanding game trees (and implementing smarter strategy -- the modules current logic is fairly simple-minded), particularly after reading my Perl Journal #18 article on trees, which discusses this modules implementation of game trees as an example of general tree-shaped data structures.
Download (0.009MB)
Added: 2007-01-02 License: Perl Artistic License Price:
1027 downloads
AJAX Tree Control 0.1
AJAX Tree Control is a modified version of SilverStripes tree control. more>>
AJAX Tree Control is a modified version of SilverStripes tree control. It adds dynamic loading of child nodes via AJAX.
The default implementation uses the prototype library to make dynamic requests, but this behavior can be overridden by setting functions on the global Tree object.
There are a few demo Ruby on Rails applications included in the distribution that show how to use and customize the tree.
<<lessThe default implementation uses the prototype library to make dynamic requests, but this behavior can be overridden by setting functions on the global Tree object.
There are a few demo Ruby on Rails applications included in the distribution that show how to use and customize the tree.
Download (0.082MB)
Added: 2007-05-07 License: BSD License Price:
902 downloads
A Jacks Game 1.0
A Jacks Game is a real-time game that runs in a Web browser using the AJAX technology. more>>
A Jacks Game is a real-time game that runs in a Web browser using the AJAX (Asynchronous JavaScript and XML) technology.
Multiple users can login in A Jacks Game to explore a common map and earn a common currency as their score.
A Jacks Game is free software released under GNU/GPL Open Source License.
<<lessMultiple users can login in A Jacks Game to explore a common map and earn a common currency as their score.
A Jacks Game is free software released under GNU/GPL Open Source License.
Download (0.014MB)
Added: 2006-01-05 License: GPL (GNU General Public License) Price:
1389 downloads
Eclipse 2D Game Engine 1.0
Eclipse 2D Game Engine provides bitmap fonts, window management, audio capabilities, image loading, error logging, and zip file. more>>
Eclipse is a set of C++ classes designed to give beginner developers a head start in developing their first games as well as more experienced developers who dont want to have to write code for mundane tasks like fonts, sprites, and image loading.
Eclipse 2D Game Engine provides bitmap fonts, window management, audio capabilities, image loading, error logging, and zip file support.
<<lessEclipse 2D Game Engine provides bitmap fonts, window management, audio capabilities, image loading, error logging, and zip file support.
Download (0.38MB)
Added: 2006-08-24 License: GPL (GNU General Public License) Price:
1166 downloads
KoalaMud Game Engine 0.3.6a
KoalaMud Game Engine project is a multithreaded MUD server. more>>
KoalaMud Game Engine project is a multithreaded MUD server.
KoalaMud is a MUD source base designed around multithreading and stability. On top of this platform, Shadow of the Wheel is evolving to demonstrate its capabilities.
Enhancements:
- Tons of new stuff done here.
- We now have basic rooms support completed, though there are still some additional pieces to be flushed out.
- We also have the first part of the skills system outlined and language support is more flushed out now.
- The network code has been completely rewriten to extract Qt from that loop.
- All input is now processed in the thread pool via ZThread tasks.
- Overall the system seems to be even more responsive now and I have not had nearly as many problems with stability since this code conversion.
- Split commands into multiple command trees that are searched as needed.
- Currently we have standard commands and immortal commands.
- All of the OLC editors have been moved under the olc command tree for simplicity and consistancy as well.
- This also paves the way for aliases later on.
- Also added color marker support.
<<lessKoalaMud is a MUD source base designed around multithreading and stability. On top of this platform, Shadow of the Wheel is evolving to demonstrate its capabilities.
Enhancements:
- Tons of new stuff done here.
- We now have basic rooms support completed, though there are still some additional pieces to be flushed out.
- We also have the first part of the skills system outlined and language support is more flushed out now.
- The network code has been completely rewriten to extract Qt from that loop.
- All input is now processed in the thread pool via ZThread tasks.
- Overall the system seems to be even more responsive now and I have not had nearly as many problems with stability since this code conversion.
- Split commands into multiple command trees that are searched as needed.
- Currently we have standard commands and immortal commands.
- All of the OLC editors have been moved under the olc command tree for simplicity and consistancy as well.
- This also paves the way for aliases later on.
- Also added color marker support.
Download (0.22MB)
Added: 2006-12-18 License: BSD License Price:
1041 downloads
XML::Simple::Tree 0.03
XML::Simple::Tree is a tree object extension for XML::Simple data structures. more>>
XML::Simple::Tree is a tree object extension for XML::Simple data structures.
SYNOPSIS
## script 1
## create XML::Simple::Tree object and do a preorder traversal
## create XML::Simple::Tree object from an xml document ($xml_file)
my $xml_obj = XML::Simple::Tree->new(file => directory.xml,
node_key => dir,
target_key => name);
## sub set_do_node() method takes subroutine reference to be executed at current node
$xml_obj->set_do_node(
sub {
my $self = $xml_obj;
my $cnode = $self->get_cnode();
my $level = $self->get_level();
my $padding = * x ($level + 1);
print "$padding$cnode->{name}[0]n";
}
);
## sub set_do_leaf() method takes subroutine reference to be executed at leaf node
$xml_obj->set_do_leaf(
sub {
my $self = $xml_obj;
print "n";
}
);
## Tree pre order traversal method that executes do_node() at each node and do_leaf() at each leaf
$xml_obj->traverse();
## script 2
## find a node and retrieve a parameter.
my $xml_obj =
XML::Simple::Tree->new(
file => $xml_file,
node_key => directory,
target_key => name
);
my $want_node = $xmlObj->find_node($target_directory);
my $mtime = $want_node->{mtime}[0];
## script 3
## find a node and cut (remove) it from tree.
my $cut_name = bin;
my $mainXml =
XML::Simple::Tree->new( file => $xml_file,
node_key => directory,
target_key => name);
$mainXml->cut_node($cut_name);
## script 4
## take XML::Simple::Tree object and paste it into a target node of another
## convert it back to xml
my $target_dir = xxx;
my $cut_tree =
XML::Simple::Tree->new(file => $cut_xml_file,
node_key => directory,
target_key => name);
$config_tree->paste_node($target_dir, $cut_tree->get_cnode()->{directory}[0]);
## convert to xml
my $xml = $config_tree->toXML();
## Additional examples can be found in the included tests.
This module extends XML::Simple by taking the data structure returned by XML::Simple::XMLin($xml_file, forcearray => 1) and putting it in a class complete with tree manipulation and traversal methods. Important to know is that XMLin is called with the option ForceArray => 1. This option forces nested elements to be represented as arrays even when there is only one.
<<lessSYNOPSIS
## script 1
## create XML::Simple::Tree object and do a preorder traversal
## create XML::Simple::Tree object from an xml document ($xml_file)
my $xml_obj = XML::Simple::Tree->new(file => directory.xml,
node_key => dir,
target_key => name);
## sub set_do_node() method takes subroutine reference to be executed at current node
$xml_obj->set_do_node(
sub {
my $self = $xml_obj;
my $cnode = $self->get_cnode();
my $level = $self->get_level();
my $padding = * x ($level + 1);
print "$padding$cnode->{name}[0]n";
}
);
## sub set_do_leaf() method takes subroutine reference to be executed at leaf node
$xml_obj->set_do_leaf(
sub {
my $self = $xml_obj;
print "n";
}
);
## Tree pre order traversal method that executes do_node() at each node and do_leaf() at each leaf
$xml_obj->traverse();
## script 2
## find a node and retrieve a parameter.
my $xml_obj =
XML::Simple::Tree->new(
file => $xml_file,
node_key => directory,
target_key => name
);
my $want_node = $xmlObj->find_node($target_directory);
my $mtime = $want_node->{mtime}[0];
## script 3
## find a node and cut (remove) it from tree.
my $cut_name = bin;
my $mainXml =
XML::Simple::Tree->new( file => $xml_file,
node_key => directory,
target_key => name);
$mainXml->cut_node($cut_name);
## script 4
## take XML::Simple::Tree object and paste it into a target node of another
## convert it back to xml
my $target_dir = xxx;
my $cut_tree =
XML::Simple::Tree->new(file => $cut_xml_file,
node_key => directory,
target_key => name);
$config_tree->paste_node($target_dir, $cut_tree->get_cnode()->{directory}[0]);
## convert to xml
my $xml = $config_tree->toXML();
## Additional examples can be found in the included tests.
This module extends XML::Simple by taking the data structure returned by XML::Simple::XMLin($xml_file, forcearray => 1) and putting it in a class complete with tree manipulation and traversal methods. Important to know is that XMLin is called with the option ForceArray => 1. This option forces nested elements to be represented as arrays even when there is only one.
Download (0.007MB)
Added: 2006-09-07 License: Perl Artistic License Price:
1144 downloads
Games::Mastermind 0.03
Games::Mastermind is a simple framework for MasterMind games. more>>
Games::Mastermind is a simple framework for MasterMind games.
SYNOPSIS
use Games::Mastermind;
# the classic game
$mm = Games::Mastermind->new;
# make a guess
$marks = $game->play(qw( Y C W R ));
# results
print "You win!n" if $marks->[0] == $mm->holes();
# the game history is available at all times
$history = $mm->history();
$last_turn = $mm->history()->[-1];
# reset the game
$mm->reset();
Games::Mastermind is a very simple framework for running Mastermind games.
<<lessSYNOPSIS
use Games::Mastermind;
# the classic game
$mm = Games::Mastermind->new;
# make a guess
$marks = $game->play(qw( Y C W R ));
# results
print "You win!n" if $marks->[0] == $mm->holes();
# the game history is available at all times
$history = $mm->history();
$last_turn = $mm->history()->[-1];
# reset the game
$mm->reset();
Games::Mastermind is a very simple framework for running Mastermind games.
Download (0.014MB)
Added: 2007-01-04 License: Perl Artistic License Price:
1024 downloads
Chess::Game 0.6.0
Chess::Game is a class to record and validate the moves of a game of chess. more>>
Chess::Game is a class to record and validate the moves of a game of chess.
SYNOPSIS
use Chess::Game;
$game = Chess::Game->new();
$clone = $game->clone();
$move = $game->make_move("e2", "e4");
$move_c = $clone->make_move("e2", "e4");
$true = ($move->get_piece() ne $move_c->get_piece());
$move = $game->delete_move();
...
while (!defined($result = $game->result())) {
# get a move
$move = $game->make_move($sq1, $sq2);
if (!defined($move)) {
print $game->get_message();
}
}
if ($result == 1) {
print "White wins!n";
}
elsif ($result == 0) {
print "Draw!n"
}
else {
print "Black wins!n";
}
The Chess module provides a framework for writing chess programs with Perl. This class forms part of that framework, providing move validation for all moves recorded using the Chess::Game class. The Game contains a Chess::Board, 32 Chess::Pieces and a Chess::Game::MoveList that contains a series of Chess::Game::MoveListEntrys that record the exact state of the game as it progresses. Moves can be taken back one-at-a-time to allow for simple movelist manipulation.
<<lessSYNOPSIS
use Chess::Game;
$game = Chess::Game->new();
$clone = $game->clone();
$move = $game->make_move("e2", "e4");
$move_c = $clone->make_move("e2", "e4");
$true = ($move->get_piece() ne $move_c->get_piece());
$move = $game->delete_move();
...
while (!defined($result = $game->result())) {
# get a move
$move = $game->make_move($sq1, $sq2);
if (!defined($move)) {
print $game->get_message();
}
}
if ($result == 1) {
print "White wins!n";
}
elsif ($result == 0) {
print "Draw!n"
}
else {
print "Black wins!n";
}
The Chess module provides a framework for writing chess programs with Perl. This class forms part of that framework, providing move validation for all moves recorded using the Chess::Game class. The Game contains a Chess::Board, 32 Chess::Pieces and a Chess::Game::MoveList that contains a series of Chess::Game::MoveListEntrys that record the exact state of the game as it progresses. Moves can be taken back one-at-a-time to allow for simple movelist manipulation.
Download (0.021MB)
Added: 2006-12-28 License: Perl Artistic License Price:
1039 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above game tree search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed