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
class Human(name: String, val color: String, | |
val height: Double, var age: Int): Character(name) { | |
var head_armor = false | |
var body_armor = false | |
var boots_armor = false | |
var weapon = false | |
override fun Run(){ | |
super<Character>.Run() | |
println("Running in beast mode...") | |
} |
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
open class Character(open var name: String) { | |
var healh = 100 | |
open fun Walk(){ | |
println("Walking...") | |
} | |
open fun Run(){ | |
println("Running...") | |
} |
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
class Human(name: String, val color: String, | |
val height: Double, var age: Int): Character(name) { | |
var head_armor = false | |
var body_armor = false | |
var boots_armor = false | |
var weapon = false | |
fun set_head_armor(){ | |
head_armor = true | |
} |
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
open class Character(open var name: String) { | |
var healh = 100 | |
fun Walk(){ | |
println("Walking...") | |
} | |
fun Run(){ | |
println("Running...") | |
} |
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
fun main(args: Array<String>) { | |
val Player = Human("Iskender","Black",1.70, 30) | |
Player.Walk() | |
Player.Talk() | |
Player.Run() | |
Player.Eat() | |
Player.Learn("Meteor Punch Combo") | |
} |
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
class Human(val name: String, val color: String, | |
val height: Float, var age: Integer): Character() { | |
var head_armor = false | |
var body_armor = false | |
var boots_armor = false | |
var weapon = false | |
fun Walk(){ | |
println("Walking...") | |
} |
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
class Human(val name: String, val color: String, val height: Float, var age: Integer): Character() { | |
var head_armor = false | |
var body_armor = false | |
var boots_armor = false | |
var weapon = false | |
fun Walk(){ | |
println("Walking...") | |
} |
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
class Human(val name: String, val color: String, val height: Float, var age: Integer){ | |
... | |
} |
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
class Human() { | |
fun Walk(){ | |
println("Walking...") | |
} | |
fun Run(){ | |
println("Running...") | |
} |
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
class Human() { | |
// Here the body of the class | |
} |
NewerOlder