Add Matlab files

This commit is contained in:
Jean-Laurent Duchaud committed 2023-09-21 21:47:48 +02:00
1 parent fa0e7d1dea
commit 02bf2b2b41
5 files changed
+131

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
function TextTest(nDays)
if nargin < 1
nDays = 2;
end
items = [
Item("+5 Dexterity Vest", 10, 20);
Item("Aged Brie", 2, 0);
Item("Elixir of the Mongoose", 5, 7);
Item("Sulfuras, Hand of Ragnaros", 0, 80);
Item("Sulfuras, Hand of Ragnaros", -1, 80);
Item("Backstage passes to a TAFKAL80ETC concert", 15, 20);
Item("Backstage passes to a TAFKAL80ETC concert", 10, 49);
Item("Backstage passes to a TAFKAL80ETC concert", 5, 49);
Item("Conjured Mana Cake", 3, 6)];
for day = 1:nDays
fprintf("-------- day %d --------\n", day)
disp("name, sellIn, quality")
for i = 1:length(items)
disp(items(i))
end
disp(" ")
GildedRose(items).update_quality()
end
end