diff --git a/src/MainContent.vue b/src/MainContent.vue index e5e2c37..1760a22 100644 --- a/src/MainContent.vue +++ b/src/MainContent.vue @@ -187,9 +187,9 @@ name : 'MainContent', methods:{ divideItem(){ - const half = Math.floor(this.maxItemCount/2); - this.partOne = this.getRandomInt(0,half); - this.partTwo = this.getRandomInt(0,half); + const half = Math.floor(this.maxItemCount/2)+1; + this.partOne = this.getRandomInt(1,half); + this.partTwo = this.getRandomInt(1,half); this.partThree = this.maxItemCount-this.partTwo-this.partOne; console.log(this.partOne,this.partTwo,this.partThree); },