schrotter vie naucit, ale hodnoti prisne.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Zobrazi prspevky MenuQuote from: Safyia on 26.01.2011, 02:59:57
B! A to som z teorie takmer nic nemala
import TextGame.Command;
import commands.*;
import interfaces.IParametric;
import java.util.ArrayList;
import java.util.List;
/**
* Parser - reprezentuje príkazový riadok.
*/
public class Parser implements TextGame.Parser {
private List<Command> myCommandList = new ArrayList<Command>();
/**
* Konštruktor. Pridáva zoznam príkazov do listu.
*/
public Parser()
{
myCommandList.add(new Version());
myCommandList.add(new Quit());
myCommandList.add(new Prikazy());
myCommandList.add(new East());
myCommandList.add(new West());
myCommandList.add(new North());
myCommandList.add(new South());
myCommandList.add(new Restart());
myCommandList.add(new LookAround());
myCommandList.add(new Explore());
myCommandList.add(new Get());
myCommandList.add(new Put());
myCommandList.add(new Inventory());
myCommandList.add(new Use());
myCommandList.add(new Save());
myCommandList.add(new Load());
myCommandList.add(new Operuj());
}
/**
* Spracúvava príkazy. Oddeluje príkaz od argumentu. Vykonáva príkazy.
* @param input
* @return referenciu na aktuálnu miesnosť
*/
public Command getCommand(String input)
{
Command aResult = null;
for (Command command : myCommandList)
{
if (input.startsWith(command.getName()))
{
if (command instanceof IParametric)
{
command.setParams(input.substring(command.getName().length()).trim());
aResult = command;
}
else
{
if ((input.length()) == (command.getName().length()))
{
aResult = command;
}
}
}
}
return aResult;
}
/**
*
* @return
*/
public List<Command> getCommands() {
return this.myCommandList;
}
}
Quote from: Buici on 08.01.2011, 15:57:48
mne sa zda ze ak spustis pmd v netbeanse tak tam to az tak nefunguje ako by malo, ked pmd spustas cez prikazovi riadok tak tu chybu nevypisuje ale vypise ine chyby podla toho ruleset....
ak budes odovzdavat pri Binasovi tak dolezity je ten prikazovi riadok takze sa nespoliehajte na netbeans
fungujuce pmd
ak niekomu pomoze tak len stiahni rozzipuj a v run.bat si upravte cestu k zdrojaku ak chcete kontorlovat tak to spustite
musi napisat ze PMD report Problems found # File Line Problem
pokial ukaze len cisto bielu stranku tak mas niekde chybu v tom run.bat (zeby cesta k zdrojovym kodom)
napisal som to ako pre debilov ale tak jeden sa tu taky nasiel uz a kazdemu pisat osobitne sa mi nechce
dufam ze mi niekto pomoze tie grafy vygenerovat lebo mne to nejde nejako.... alebo mam pouzit skicar???
Quote from: Ragnol on 05.01.2011, 02:28:58Quote from: Daron on 05.01.2011, 02:21:02
Prilad cislo 3, dufam ze spravne prepisany.
d, T(T( x ) + T( y ))
Vo formule nemozes mat predikat v predikate. lebo nie je term.