Browse Source

Add LICENSE and README files to the distributions

Add WASD key usage to game

Signed-off-by: Chris Cromer <chris@cromer.cl>
master
Chris Cromer 2 years ago
parent
commit
9f6d6853ad
  1. 24
      build.gradle
  2. 11
      src/dist/LICENSE
  3. 26
      src/dist/README
  4. 2
      src/main/java/cl/cromer/azaraka/Constantes.java
  5. 4
      src/main/java/cl/cromer/azaraka/object/Player.java

24
build.gradle

@ -61,6 +61,30 @@ build {
dependsOn copyDependencies
}
plugins.withType(DistributionPlugin) {
distTar {
// This is a correct assignment and works as intended
//noinspection GroovyAssignabilityCheck
archiveExtension = "tar.gz"
compression = Compression.GZIP
}
}
task createDocs {
def docs = file("$buildDir/docs")
outputs.dir docs
}
distributions {
main {
contents {
from(createDocs) {
into 'docs'
}
}
}
}
jar.dependsOn(copyDependencies)
tasks.withType(JavaCompile) {

11
src/dist/LICENSE

@ -0,0 +1,11 @@
Copyright 2019 Chris Cromer
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

26
src/dist/README

@ -0,0 +1,26 @@
Hace miles de años en una edad próspera, un guerrero poderoso llamado Tomak conquistó al continente Azaraka.
Tomak robó las 2 gemas mágicas, la gema de la vida y la gema de la muerte. Usando su magia, manchó las gemas
con el mal causando que el mundo cayera en un edad oscura. La tierra se ha vuelto estéril, los lagos y ríos se
han secado, la gente está enferma y moribunda y no hay esperanza. Tomak ocultó las gemas en la mazmorra de un
castillo para protegerlas. Después de muchos años un mago de una tierra lejana llegó a ayudar Azaraka.
Para restablecer el equilibrio en el mundo el mago debe encontrar las llaves para abrir los cofres que
contienen las gemas y llevarlos al portal mágico para purificar las gemas y salvar Azaraka. Pero Tomak
se ha enterado que el mago llegó a Azaraka y está esperando en la mazmorra para matar el mago.
¿Puede nuestro héroe salvar al mundo, o fracasará y nos dejará para siempre en la oscuridad y la
desesperación?
¿Cómo jugar?
Mover para arriba:
W ó flecha arriba
Mover para la izquerda:
A ó flecha izquerda
Mover para abajo:
S ó flecha abajo
Mover a la derecha:
D o flecha derecha
Interactuar:
Barra espaciadora
Pistas:
¡Al tener una gema el portal se activa!
¡Al tener las dos gemas la salida se abre!

2
src/main/java/cl/cromer/azaraka/Constantes.java

@ -37,7 +37,7 @@ public interface Constantes {
/**
* Whether or not the player should be controlled by AI
*/
boolean PLAYER_AI = true;
boolean PLAYER_AI = false;
/**
* Make logs
*/

4
src/main/java/cl/cromer/azaraka/object/Player.java

@ -95,15 +95,19 @@ public class Player extends Object implements Constantes {
}
}
switch (keyCode) {
case KeyEvent.VK_W:
case KeyEvent.VK_UP:
moveUp();
break;
case KeyEvent.VK_S:
case KeyEvent.VK_DOWN:
moveDown();
break;
case KeyEvent.VK_A:
case KeyEvent.VK_LEFT:
moveLeft();
break;
case KeyEvent.VK_D:
case KeyEvent.VK_RIGHT:
moveRight();
break;

Loading…
Cancel
Save