Skip to content

API documentation

Jaeyoung edited this page Sep 30, 2020 · 5 revisions

Documentation

This is documentation of fields and method in our program. BE CAREFUL ABOUT STATIC AND NON-STATIC FIELD AND METHOD.

Methods

waitingTime(int t)

public static void waitingTime(int t)

Description

makes the Program stops for a while for amount t. t = 1000 is 1 second.

Return

Returns nothing


randomNum(int a, int b)

public static int randomNum(int a, int b)

Description

returns a random number greater than equal to a and less than equal to b thus inclusive.

Return

Returns int x that a ≤ x ≤ b


percentProb(int a)

public static boolean percentProb(int a)

Description

input a% and results in true or false based on the probability. If true, within the probability. If false, outside the probability.

Return

Returns boolean type : true or false


scanChar()

public static char scanChar()

Description

scanning a character typed from keyboard

Return

Returns char type


scanString()

public static String scanString()

Description

scanning a String value from keyboard

Return

Returns String type


scanInt()

public static int scanInt()

Description

scanning a int value from keyboard

Return

Returns int type


stop()

public static void stop()

Description

just Program needed for scanner. NOT ACTUALLY USED

Return

Returns nothing


Fields

static String name; //Character name

static String classType; //Character class

static int lv; //level

static int age; // age

static int str; //strength

static int wis; //wisdom

static int agi; //agility

static int hpMax; //maximum HP

static int hpNow; //current HP

static int mpMax; //maximum MP

static int mpNow; //current MP

static int atk; //attack damage, this must be calulated in regard to other effects(weapon damage etc.)

static int coin; //money

static int currentPart; //current part in the story

static String currentState; //tells what the charcter is doing idle, fighting, shoping etc.

Methods

makeStats(multiple parameters)

public static void makeStats(String nameChoice, String classTypeChoice, int lvChoice, int ageChoice, int strChoice, int wisChoice, int agiChoice, int hpMaxChoice, int hpNowChoice, int mpMaxChoice, int mpNowChoice, int atkChoice, int coinChoice)

Description

declaring field, creating a character

Return

returns nothing


statPage()

public static void statPage()

Description

printing out stats of the character

Return

Nothing


Description
Return
Clone this wiki locally