Guest User

Untitled

a guest
Jan 16th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. contract Coiners {
  2. enum EmozioniPersona { felice, triste, normale }
  3. EmozioniPersona persona;
  4.  
  5. function getEmozione() public view returns (uint) {
  6. return uint(persona);
  7. }
  8.  
  9. function setFelice() returns(uint){
  10. persona = EmozioniPersona.felice;
  11. return uint(persona);
  12. }
  13.  
  14. function setTriste() returns(uint){
  15. persona = EmozioniPersona.triste;
  16. return uint(persona);
  17. }
  18.  
  19. function setNormale() returns(uint){
  20. persona = EmozioniPersona.normale;
  21. return uint(persona);
  22. }
  23. }
Add Comment
Please, Sign In to add comment