Array
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
class Personagem{
|
||||
nome: string;
|
||||
raro: boolean;
|
||||
num_constelaçao: number;
|
||||
best_const: number;
|
||||
|
||||
constructor(nome: string, raro: boolean, best_const: number){
|
||||
this.nome = nome;
|
||||
this.raro = raro;
|
||||
this.best_const = best_const;
|
||||
}
|
||||
}
|
||||
const personagens: Personagem[] = [
|
||||
new Personagem("Xiangling", false, 4),
|
||||
new Personagem("Xingqiu", false, 3),
|
||||
new Personagem("Dehya", true, 5)
|
||||
]
|
||||
|
||||
|
||||
|
||||
function main(){
|
||||
@@ -29,8 +41,7 @@ function main(){
|
||||
}
|
||||
}
|
||||
}
|
||||
function create(){
|
||||
console.log("Criando. . .");
|
||||
function create(nome: string, raro: boolean, best_const: number){
|
||||
}
|
||||
|
||||
function read(){
|
||||
@@ -45,4 +56,6 @@ function del(){
|
||||
console.log("Deletando. . .");
|
||||
}
|
||||
|
||||
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user