This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- use_module(library(assoc)). | |
%Version 0.1 of PROLOG BASIC. | |
%Author: Victor Lagerkvist. | |
%License: not sure, as long as I'm not responsible for anything. | |
%TODO: comment everything. :( | |
%Run the program corresponding to StatementList (see the end of this | |
%file for a concrete example). Try the query: example_program(P), | |
%run(P, Comp). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- protocol(l_system). | |
:- public(rule//1). | |
:- public(axiom/1). | |
:- end_protocol. | |
:- object(algae, | |
implements(l_system)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- protocol(l_system). | |
:- public(rule//1). | |
:- public(axiom/1). | |
:- end_protocol. | |
:- object(algae, | |
implements(l_system)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- initialization(( | |
logtalk_load(library(metapredicates_loader)), | |
logtalk_load(library(types_loader)), | |
logtalk_load(scales), | |
logtalk_load(synthesizer), | |
logtalk_load(wav), | |
logtalk_load(xenakis) | |
)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- object(wav). | |
:- public(prepare/1). | |
:- public(write_audio/2). | |
num_samples(100000). | |
num_channels(1). | |
bits_per_sample(16). | |
sample_rate(22050). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- object(builder). | |
:- info([ | |
version is 1.0, | |
author is 'Victor Lagerkvist', | |
date is 2011/04/14, | |
comment is 'The object that builds the entities of Bacchus-Bosch.']). | |
:- public(build/5). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- object(property). | |
:- info([ | |
version is 1.0, | |
author is 'Victor Lagerkvist', | |
date is 2011/03/19, | |
comment is 'A property constitutes the basic behaviours of the objects in Bacchus-Bosch.']). | |
:- public(update/2). | |
:- mode(update(+entity, -entity), zero_or_more). | |
:- info(update/2, [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- object(property). | |
:- info([ | |
version is 1.0, | |
author is 'Victor Lagerkvist', | |
date is 2011/03/19, | |
comment is 'A property constitutes the basic behaviours of the objects in Bacchus-Bosch.']). | |
:- public(update/2). | |
:- mode(update(+entity, -entity), zero_or_more). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- object(game). | |
:- info([ | |
version is 1.0, | |
author is 'Victor Lagerkvist', | |
date is 2011/03/09, | |
comment is 'The core functionality of Bacchus-Bosch.']). | |
:- public(init/0). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- object(game). | |
:- info([ | |
version is 1.0, | |
author is 'Victor Lagerkvist', | |
date is 2011/02/28, | |
comment is 'The core functionality of Bacchus-Bosch.']). | |
:- public(init/0). |