Skip to content

Instantly share code, notes, and snippets.

@funnythingz
Last active December 30, 2015 10:39
Show Gist options
  • Save funnythingz/7817795 to your computer and use it in GitHub Desktop.
Save funnythingz/7817795 to your computer and use it in GitHub Desktop.
// Domain
module Horoscope {
//占い日
export class DivinationDate {
constructor(
public year: Day,
public month: Day,
public date: Day
) {}
}
//星座
export class Constellation {
constructor(public name: String) {}
}
//メッセージ
export class Message {
constructor(public message: string) {}
say(): string {
return this.message;
}
}
//運
export class Level {
constructor(public level: number) {}
put(): string {
return this.level.toString();
}
}
//総合運
export class TotalLevel extends Level {
constructor(level: number) {
super(level);
}
}
//恋愛運
export class LoveLevel extends Level {
constructor(level: number) {
super(level);
}
}
//仕事運
export class JobLevel extends Level {
constructor(level: number) {
super(level);
}
}
//お金運
export class MoneyLevel extends Level {
constructor(level: number) {
super(level);
}
}
//ランク
export class Rank {}
//ラッキーカラー
export class LuckyColor {}
}
module ViewModel {
//神託
export class Oracle {
constructor(
public message: Horoscope.Message,
public levelOfTotal: Horoscope.TotalLevel,
public levelOfLove: Horoscope.LoveLevel,
public levelOfJob: Horoscope.JobLevel,
public levelOfMoney: Horoscope.MoneyLevel,
public rank: Horoscope.Rank,
public luckyColor: Horoscope.LuckyColor,
) {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment