Define yourself in JS { JS practice }

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
Hey guys so I wanted since it's a good practice....why not define ourself in coding? 

if I explain you will take a base or a core function and you will define yourself by using this core function 

var Entity = new Entity_Basefunction Entity_Base() {var inteligence = 0;var language = [];var sexe = undefined;var race = undefined;var art_level = 0; // maximum on 10var programing_level = 0;var music_level = 0;var design_level = 0;var event_level = 0;var pixel_level = 0;}and with that you have your OWN imagination to create yourself as a function  you have the right to extend the core function AS LONG this not DIRECT overwrite like copy paste and change directly the function....

why this practice because it's permit to show to other people ways for coding AND obviously ways for show your level in coding c: !

the directive : 

  • Create a function with your name who inherit of Entity_Base
  • redefine ALL the var in your functions!
  • At least add one new thing's in your function

mine is not so good since I am not so used to JS but I tried hard :c

function Nio_Kasgami() {Entity.prototype.inteligence = 78;Entity.prototype._language.push("French","English");Entity.prototype.sexe = "male";Entity.prototype.race = "French-Canadian";Entity.prototype.art_level = 8.5;Entity.prototype.programing_level = 5.5;Entity.prototype.music_level = 2;Entity.prototype.design_level = 7;Entity.prototype.event_level  = 6;Entity.prototype.pixel_level  = 3;this.create_new_data();} Nio_Kasgami.prototype.create_new_data = function(){ return "Nioniese";} 
so now your turns guys :D !

EDIT : fixed a bunch of unnecessary code :/
 
Last edited by a moderator:

Niten Ichi Ryu

Grey Lords Emissary
Veteran
Joined
Jul 27, 2012
Messages
1,321
Reaction score
1,239
First Language
French
Primarily Uses
RMMV
@nio, this is kinda funny, but I also think you have probably over exhausted yourself with JS this last month, no?

You have a new bed, get some sleep ;)

Also for race, you should simply put human, like the rest of us. There is no such things as different races...

French Canadian would be your origin, not your race.
 
Last edited by a moderator:

EternalShadow

Veteran
Veteran
Joined
Sep 16, 2012
Messages
5,781
Reaction score
1,041
First Language
English
Primarily Uses
@nitenman:

race2

reɪs/

noun

noun: race; plural noun: races

each of the major divisions of humankind, having distinct physical characteristics.

"people of all races, colours, and creeds"

synonyms: ethnic group, racial type, (ethnic) origin

"the school has pupils of many different races"

the fact or condition of belonging to a racial division or group; the qualities or characteristics associated with this.

synonyms: ethnic group, racial type, (ethnic) origin

"the school has pupils of many different races"

a group of people sharing the same culture, history, language, etc.; an ethnic group.

"we Scots were a bloodthirsty race then"

synonyms: ethnic group, racial type, (ethnic) origin More

a group or set of people or things with a common feature or features.

"some male firefighters still regarded women as a race apart"

synonyms: group, type, sort, class, kind, variety, ilk, genre, cast, style, brand, vintage, order, breed, species, generation

"a new race of novelists had appeared"

BIOLOGY

a population within a species that is distinct in some way, especially a subspecies.

"people have killed so many tigers that two races are probably extinct"

(in non-technical use) each of the major divisions of living creatures.

"a member of the human race"

literary

a group of people descended from a common ancestor.

"a prince of the race of Solomon"

synonyms: family, line, lineage, house, dynasty, stock, blood, folk, clan, tribe; More

archaic

ancestry.

"two coursers of ethereal race"
SPECIES would be human.

Anyway I'll have a go at this later :)
 

Niten Ichi Ryu

Grey Lords Emissary
Veteran
Joined
Jul 27, 2012
Messages
1,321
Reaction score
1,239
First Language
French
Primarily Uses
RMMV
OK, I started going off topic, so hotfire, we can take this to PM on later if you want but:

Even though there is a broad scientific agreement that essentialist and typological conceptualizations of race are untenable, scientists around the world continue to conceptualize race in widely differing ways, some of which have essentialist implications.While some researchers sometimes use the concept of race to make distinctions among fuzzy sets of traits, others in the scientific community suggest that the idea of race often is used in a naiveor simplistic way, and argue that, among humans, race has no taxonomic significance by pointing out that all living humans belong to the same species, Homo sapiens, and subspecies, Homo sapiens sapiens.

I'm not fond of people using race as a term of distinction to be honest, so maybe adding species is enough, and change race for ethnical group.

End of off topicism, nio sorry for the hijack.
 
Last edited by a moderator:

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
var Person = {


defaultState: {


name: null,


jobDescription: null,


RpgMakeLover: false


},


name: function (name) {


defaultState.name = name;


},


jobDescription: function (najobDescriptionme) {


defaultState.jobDescription = jobDescription;


},


RpgMakeLover: function (boolean) {


defaultState.RpgMakeLover = boolean;


},


getInfo: function() {


console.log(defaultState.name + ', ' + defaultState.jobDescription + ', ' + defaultState.RpgMakeLover);


}


}


module.exports = Person;


// Else Where:


Var PersonClass = require('./person.js');


PersonClass.name('Adam');


PersonClass.jobDescription('Senior Web Developer');


PersonClass.RpgMakeLover(true);


PersonClass.getInfo();
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top